3.12.0 #8
Workflow file for this run
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: Build and Release gem | |
on: | |
release: | |
types: [published] | |
jobs: | |
release: | |
name: Release to gem hosts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup ruby | |
uses: actions/setup-ruby@v1 | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch origin +refs/tags/*:refs/tags/* | |
- name: Setup credentials and versioning | |
run: | | |
gem install keycutter | |
mkdir -p $HOME/.gem | |
touch $HOME/.gem/credentials | |
chmod 0600 $HOME/.gem/credentials | |
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials | |
printf -- ":github: Bearer ${GPR_API_KEY}\n" >> $HOME/.gem/credentials | |
env: | |
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}} | |
GPR_API_KEY: ${{secrets.GITHUB_TOKEN}} | |
- name: Build emass_client | |
run: gem build -C src/ruby_client/ emass_client.gemspec | |
- name: Publish to RubyGems | |
run: | | |
gem push --KEY rubygems --host https://rubygems.org src/ruby_client/*.gem | |
- name: Publish to GPR | |
run: | | |
gem push --KEY github --host https://rubygems.pkg.github.com/mitre src/ruby_client/*.gem | |
env: | |
OWNER: mitre |