Skip to content

Commit

Permalink
fix: improve Ruby release workflow
Browse files Browse the repository at this point in the history
- Remove redundant `git push`
- Combine jobs for creating a GitHub release
  • Loading branch information
ybiquitous committed Dec 14, 2023
1 parent 99f2f8b commit e72e1a0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/ruby-release-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@ jobs:
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Publish to gem registry
- name: Release gem
run: bundle exec rake release
env:
GEM_HOST_API_KEY: ${{ secrets.api-key }}
GEM_HOST_OTP_CODE: ${{ inputs.otp }}
- name: Push tag
run: git push --follow-tags
- name: Get tag
run: echo "TAG_NAME=$(git describe --abbrev=0)" >> "${GITHUB_ENV}"
- name: Create GitHub release
run: gh release create "${TAG_NAME}" --draft
run: |
tag_name="$(git describe --tags --abbrev=0)"
gh release create "${tag_name}" --verify-tag --draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e72e1a0

Please sign in to comment.