Skip to content

Commit

Permalink
Merge pull request #6 from maful/use-release-gem-actions
Browse files Browse the repository at this point in the history
ci: use rubygems/release-gem for automate releasing
  • Loading branch information
maful authored Jul 24, 2024
2 parents bde19ee + d96b44c commit 81acdc5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
pull_request:
workflow_call:

jobs:
build:
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@ on:
types: [published]

jobs:
test:
uses: ./.github/workflows/ci.yml

publish:
needs: test
runs-on: ubuntu-latest

permissions:
id-token: write
contents: write

steps:
- name: "☁️ checkout repository"
uses: actions/checkout@v4
Expand All @@ -22,13 +31,4 @@ jobs:
- name: "📀 building"
run: bundle exec rake transform:icons

- name: "🚀 publish to rubygems"
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
bundle exec rake build
gem push pkg/*.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
- uses: rubygems/release-gem@v1

0 comments on commit 81acdc5

Please sign in to comment.