Merge pull request #155 from authzed/api-change/v1.45.4 #34
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: "Publish gem to Rubygems" | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: "actions/checkout@v5" | |
| - name: "Set up Ruby" | |
| uses: "ruby/setup-ruby@v1" | |
| with: | |
| bundler-cache: true | |
| - name: "Install deps" | |
| run: | | |
| gem install bundler | |
| bundle install | |
| # Set the version at release time | |
| - name: Write release version | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#v} | |
| echo Version: $VERSION | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Set version within package | |
| run: "bundle exec bump set ${VERSION} --no-commit" | |
| - name: "Build the package" | |
| run: "bundle exec rake build" | |
| - name: "Publish the package" | |
| run: "bundle exec gem push pkg/*.gem" | |
| env: | |
| GEM_HOST_API_KEY : "${{ secrets.RUBYGEMS_API_KEY }}" |