Skip to content

Commit

Permalink
Merge pull request #14 from qonto/deploy_on_version_change
Browse files Browse the repository at this point in the history
Deploy on version change
  • Loading branch information
MaximeD authored Jun 6, 2023
2 parents 47be649 + cd10aa3 commit ef4adf9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
37 changes: 20 additions & 17 deletions .github/workflows/rubygems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,34 @@ name: Ruby Gem

on:
push:
tags:
- '*'
branches:
- master
paths:
- lib/activejob/traceable/version.rb

jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
environment: master
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
- name: Set up Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
- uses: actions/checkout@v3
- name: Set up Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2

- 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
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
- 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
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/qonto/
## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

# Releasing

To publish a new version to rubygems, update the version in `lib/activejob/traceable/version.rb`, and merge.
2 changes: 1 addition & 1 deletion lib/activejob/traceable/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module ActiveJob
module Traceable
VERSION = '0.4.0'
VERSION = '0.4.1'
end
end

0 comments on commit ef4adf9

Please sign in to comment.