-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (65 loc) · 1.86 KB
/
gem.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Cross Gem
on:
push:
branches:
- release-gem-workflow
# tags:
# - "v*"
jobs:
ci-data:
runs-on: ubuntu-latest
outputs:
result: ${{ steps.fetch.outputs.result }}
steps:
# This compiles for all supported Ruby cross-compilation platforms.
- id: fetch
uses: oxidize-rb/actions/fetch-ci-data@main
with:
supported-ruby-platforms: |
exclude: []
cross_gems:
name: Cross compile gems
needs: ci-data
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-platform: ${{ fromJSON(needs.ci-data.outputs.result).supported-ruby-platforms }}
environment: "deploy"
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- uses: oxidize-rb/actions/cross-gem@v1
id: cross-gem
with:
platform: ${{ matrix.ruby-platform }}
ruby-versions: 3.0,3.1,3.2,3.3
- uses: actions/upload-artifact@v3
with:
name: cross-gem-${{ matrix.ruby-platform }}
path: pkg/
if-no-files-found: error
retention-days: 1
- name: Display structure of created files
run: git ls-files
- name: Display structure of created files
run: ls -R pkg/
# - name: Release gem
# if: startsWith(github.ref, 'refs/tags/v')
# working-directory: pkg/
# env:
# GEM_API_KEY: ${{secrets.GEM_API_KEY}}
# run: |
# mkdir -p $HOME/.gem
# touch $HOME/.gem/credentials
# chmod 0600 $HOME/.gem/credentials
# printf -- "---\n:rubygems_api_key: ${GEM_API_KEY}\n" > $HOME/.gem/credentials
# for i in *.gem; do
# if [ -f "$i" ]
# then
# gem push "$i" || true
# fi
# done