Skip to content

Commit

Permalink
Merge pull request #4430 from DataDog/tonycthsu/fix-publish
Browse files Browse the repository at this point in the history
Fix publish action
  • Loading branch information
TonyCTHsu authored Feb 26, 2025
2 parents b2274aa + d7f2928 commit 25911c5
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ jobs:
- rubygems-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
GEM_VERSION: ${{ needs.verify-checks.outputs.version }}
permissions:
contents: write
Expand Down Expand Up @@ -153,6 +154,10 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@8388f20e6a9c43cd241131b678469a9f89579f37 # v1.216.0
with:
ruby-version: '3.3.7'
- run: bundle install
- id: next_version
run: |
Expand Down Expand Up @@ -264,11 +269,16 @@ jobs:
with:
fetch-depth: 0
- run: |
JOB_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs/${{ github.job }}"
JOB_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
TEMP_BRANCH="update-document-v${GEM_VERSION}"
# Create and checkout a new branch from the tag
git checkout -b "${TEMP_BRANCH}" "v${GEM_VERSION}"
git push origin "${TEMP_BRANCH}"
gh pr create \
--base release \
--head master \
--head "${TEMP_BRANCH}" \
--title "Update document v${GEM_VERSION}" \
--body "This is an auto-generated PR to update documentation from [here](${JOB_URL}). Please merge (with a merge commit) when ready." \
--label "docs"

0 comments on commit 25911c5

Please sign in to comment.