Bump 0.5.2 #49
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: Publish Gem | |
on: | |
push: | |
tags: | |
- v** | |
jobs: | |
build-ruby: | |
name: ruby | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Ruby 2.6 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.6' | |
- name: Build gem | |
run: gem build *.gemspec | |
- name: Run tests | |
run: | | |
gem install *.gem | |
bundle install | |
rake test:gem | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: "ruby-gem" | |
path: "*.gem" | |
- 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 push *.gem | |
env: | |
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}" | |
build-native: | |
strategy: | |
matrix: | |
platform: ['x86-mingw32', 'x64-mingw-ucrt', 'x64-mingw32', 'x86_64-linux', 'x86_64-darwin', 'arm64-darwin'] | |
name: "${{ matrix.platform }}" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
container: | |
image: "ghcr.io/rake-compiler/rake-compiler-dock-image:1.3.0-mri-${{ matrix.platform }}" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Build native gem | |
shell: bash | |
run: | | |
bundle install | |
bundle exec rake gem:${{ matrix.platform }}:build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: "${{ matrix.platform }}-gem" | |
path: pkg/*.gem | |
- name: Publish to RubyGems | |
shell: bash | |
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 push pkg/*.gem | |
env: | |
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_API_KEY}}" |