Skip to content

Release

Release #5

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
tags: [ "v*.*.*" ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci-data:
runs-on: ubuntu-latest
name: CI data
outputs:
result: ${{ steps.fetch.outputs.result }}
ruby_versions: ${{ steps.ruby_versions.outputs.result }}
steps:
- name: Fetch CI data
uses: oxidize-rb/actions/fetch-ci-data@v1
id: fetch
with:
supported-ruby-platforms: |
exclude: []
# stable-ruby-versions: |
# exclude: [head]
- name: Fetch helper Ruby script
uses: actions/checkout@v4
with:
sparse-checkout: |
ruby_versions.rb
sparse-checkout-cone-mode: false
- name: Fetch supported Ruby versions
id: ruby_versions
shell: bash
run: |
: Run query
result="$(ruby ./ruby_versions.rb ./xml2json.gemspec)"
echo "result=$result" >> $GITHUB_OUTPUT
cross-gem:
name: Compile native gem for ${{ matrix.platform }}
runs-on: ubuntu-latest
needs: ci-data
strategy:
fail-fast: false
matrix:
platform: ${{ fromJSON(needs.ci-data.outputs.result).supported-ruby-platforms }}
ruby:
- "2.7.8"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
rubygems: "3.4.14"
- name: Cross-compile gem
uses: oxidize-rb/actions/cross-gem@v1
id: cross-gem
with:
platform: ${{ matrix.platform }}
ruby-versions: ${{ needs.ci-data.outputs.ruby_versions }}
- name: Test cross-compiled gem
uses: oxidize-rb/actions/test-gem-build@main
with:
platform: ${{ matrix.ruby-platform }}
ruby-versions: ${{ needs.ci-data.outputs.ruby_versions }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: cross-gem-${{ matrix.platform }}
path: ${{ steps.cross-gem.outputs.gem-path }}
if-no-files-found: error
retention-days: 1