Skip to content

Commit

Permalink
Fix artifact uploading
Browse files Browse the repository at this point in the history
  • Loading branch information
judy-zz committed Aug 22, 2023
1 parent 0384971 commit c0e7d64
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

jobs:
ci-data:
name: Fetch CI data
runs-on: ubuntu-latest
outputs:
result: ${{ steps.fetch.outputs.result }}
Expand All @@ -20,26 +21,55 @@ jobs:
stable-ruby-versions: |
exclude: [head]
cross-gem:
name: Compile native gem for ${{ matrix.platform }}
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:
Expand Down

0 comments on commit c0e7d64

Please sign in to comment.