diff options
author | Matt Strapp <matt@mattstrapp.net> | 2024-10-31 08:35:24 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2024-10-31 08:35:24 -0500 |
commit | 341f60ade994125d54b7d2264bbebd7a4ea372dc (patch) | |
tree | 157db89ccb5487a295cbedc08e4304c242e33a89 /.github/workflows/ruby.yml | |
parent | feat: Svelte (#34) (diff) | |
download | locusts-341f60ade994125d54b7d2264bbebd7a4ea372dc.tar locusts-341f60ade994125d54b7d2264bbebd7a4ea372dc.tar.gz locusts-341f60ade994125d54b7d2264bbebd7a4ea372dc.tar.bz2 locusts-341f60ade994125d54b7d2264bbebd7a4ea372dc.tar.lz locusts-341f60ade994125d54b7d2264bbebd7a4ea372dc.tar.xz locusts-341f60ade994125d54b7d2264bbebd7a4ea372dc.tar.zst locusts-341f60ade994125d54b7d2264bbebd7a4ea372dc.zip |
ci: Only run on version tag and use official action
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '.github/workflows/ruby.yml')
-rw-r--r-- | .github/workflows/ruby.yml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 613eade..b359a28 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -27,7 +27,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.3 + ruby-version: ruby bundler-cache: true - name: Build and test with Rake run: bundle exec rake @@ -49,7 +49,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.3 + ruby-version: ruby bundler-cache: true - name: Build gem run: bundle exec rake build @@ -65,7 +65,8 @@ jobs: publish-release: name: Push gem to RubyGems.org needs: build-and-test - if: ${{ github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/') }} + # Only run on this on proper semver (vX.Y.Z) tags + if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }} runs-on: ubuntu-latest permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing @@ -76,8 +77,8 @@ jobs: uses: ruby/setup-ruby@v1 with: bundler-cache: true - ruby-version: 3.3 + ruby-version: ruby - name: Build gem run: bundle exec rake build - name: Publish gem - run: gem push pkg/*.gem
\ No newline at end of file + uses: rubygems/release-gem@v1
\ No newline at end of file |