remove gem-glob #13
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: Compile and Upload | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "main" | |
env: | |
ACTIONS_STEP_DEBUG: true | |
jobs: | |
ci-data: | |
name: Fetch CI data | |
runs-on: ubuntu-latest | |
outputs: | |
result: ${{ steps.fetch.outputs.result }} | |
steps: | |
- uses: oxidize-rb/actions/fetch-ci-data@v1 | |
id: fetch | |
with: | |
supported-ruby-platforms: true | |
stable-ruby-versions: | | |
exclude: [head] | |
cross-gem: | |
name: ${{ matrix.platform }} compilation | |
runs-on: ubuntu-latest | |
needs: ci-data | |
strategy: | |
matrix: | |
platform: ${{ fromJSON(needs.ci-data.outputs.result).supported-ruby-platforms }} | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout project | |
- uses: ruby/setup-ruby@v1 | |
name: Setup ruby | |
with: | |
ruby-version: "3.1" | |
- uses: oxidize-rb/actions/cross-gem@v1 | |
name: Compile ${{ matrix.platform }} | |
id: cross-gem | |
with: | |
platform: ${{ matrix.platform }} | |
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ',') }} | |
- uses: actions/upload-artifact@v2 | |
name: Upload ${{ matrix.platform }} artifact | |
with: | |
name: cross-gem | |
path: ${{ steps.cross-gem.outputs.gem-path }} | |
deploy-gems: | |
name: Deploy gems for all platforms | |
runs-on: ubuntu-latest | |
needs: cross-gem | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout project | |
- uses: ruby/setup-ruby@v1 | |
name: Setup ruby | |
with: | |
ruby-version: "3.1" | |
- uses: actions/download-artifact@v3 | |
name: Download all compiled artifacts | |
with: | |
name: cross-gem | |
path: pkg | |
- name: Display structure of downloaded files | |
run: ls -R | |
working-directory: pkg | |
- uses: fac/ruby-gem-setup-credentials-action@v2 | |
name: Set up github creds for pushing | |
with: | |
token: ${{ secrets.github_token }} | |
- uses: fac/ruby-gem-push-action@v2 | |
name: Push gem to Github Packages | |
env: | |
GEM_HOST: https://rubygems.pkg.github.com/retailzipline | |
with: | |
key: github | |
pre-release: true | |
- run: cat push.out > "$GITHUB_OUTPUT" | |
- uses: actions/upload-artifact@v3 | |
name: Download all compiled artifacts | |
with: | |
name: pushout | |
path: push.out |