Merge pull request #8 from tiltcamp/dependabot/bundler/rack-3.0.9.1 #20
This file contains 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: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
release-type: ruby | |
package-name: omniauth-outseta | |
version-file: "lib/omniauth/outseta/version.rb" | |
- uses: actions/checkout@v2 | |
if: ${{ steps.release.outputs.release_created }} | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.2.2 | |
if: ${{ steps.release.outputs.release_created }} | |
- run: bundle install | |
if: ${{ steps.release.outputs.release_created }} | |
- 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}}" | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Publish to GitHub Packages | |
run: | | |
printf -- "---\n:github: Bearer ${GITHUB_TOKEN}\n" > $HOME/.gem/credentials | |
export OWNER=$( echo ${{ github.repository }} | cut -d "/" -f 1 ) | |
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem | |
env: | |
GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" | |
if: ${{ steps.release.outputs.release_created }} |