Skip to content

Commit ec3478a

Browse files
author
volodymyr_stashchenk
committed
use release-please
1 parent 447270d commit ec3478a

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/gem-push.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@ on:
44
push:
55
branches: [ main ]
66

7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
711
jobs:
812
release-please:
913
runs-on: ubuntu-latest
1014
steps:
1115
- uses: GoogleCloudPlatform/release-please-action@v2
1216
id: release
1317
with:
14-
token: ${{ secrets.GH_TOKEN }}
1518
release-type: ruby
1619
package-name: 'json_logic_ruby'
1720
version-file: "json_logic/lib/json_logic.rb"
21+
bump-minor-pre-major: true
1822
- uses: actions/checkout@v2
1923
if: ${{ steps.release.outputs.release_created }}
2024
- uses: ruby/setup-ruby@v1
@@ -23,15 +27,14 @@ jobs:
2327
if: ${{ steps.release.outputs.release_created }}
2428

2529
# Release the gem to https://rubygems.org if a release has been created.
26-
- name: Release Gem
30+
- name: Publish gem
2731
run: |
28-
gem install bundler
29-
bundle config unset deployment
30-
bundle install
3132
mkdir -p $HOME/.gem
3233
touch $HOME/.gem/credentials
3334
chmod 0600 $HOME/.gem/credentials
34-
printf -- "---\n:rubygems_api_key: ${secrets.RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
35+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
3536
gem build *.gemspec
3637
gem push *.gem
38+
env:
39+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
3740
if: ${{ steps.release.outputs.release_created }}

0 commit comments

Comments
 (0)