fix(deps): support Rails 7 syntax (#29) #1
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: Publish gem | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- lib/human_enum/version.rb | |
permissions: | |
packages: write | |
contents: read | |
jobs: | |
tests: | |
uses: ./.github/workflows/tests.yml | |
publish: | |
runs-on: ubuntu-latest | |
needs: tests | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
rubygems: latest | |
bundler-cache: true | |
- name: Create credentials file | |
run: | | |
mkdir -p $HOME/.gem | |
touch $HOME/.gem/credentials | |
chmod 600 $HOME/.gem/credentials | |
echo ":github: Bearer ${GITHUB_TOKEN}" >> ~/.gem/credentials | |
echo ":rubygems_api_key: Bearer ${RUBYGEMS_AUTH_TOKEN}" > ~/.gem/credentials | |
- name: Build gem | |
run: gem build *.gemspec | |
- name: Publish to Github Packages | |
run: | | |
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
OWNER: rafasoares | |
- name: Publish to RubyGems | |
run: | | |
gem push *.gem | |
env: | |
RUBYGEMS_AUTH_TOKEN: ${{secrets.RUBYGEMS_AUTH_TOKEN}} |