Skip to content

Commit babc5db

Browse files
committed
fix(release) bump ruby version, push gem in separate gh actions job in parallel
1 parent 158d5b7 commit babc5db

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,37 @@ jobs:
111111
with:
112112
user: __token__
113113
password: ${{ secrets.PYPI_API_TOKEN }}
114+
list-ruby-gems:
115+
name: "List ruby gems"
116+
runs-on: ubuntu-latest
117+
if: "startsWith(github.event.release.tag_name, 'ruby-')"
118+
outputs:
119+
files_json: ${{ steps.list-files.outputs.files_json }}
120+
steps:
121+
- uses: robinraju/[email protected]
122+
with:
123+
tag: ${{ github.event.release.tag_name }}
124+
fileName: "*"
125+
tarBall: false
126+
zipBall: false
127+
out-file-path: "dist"
128+
token: ${{ secrets.GITHUB_TOKEN }}
129+
- id: list-files
130+
run: |
131+
FILES=$(ls dist)
132+
FILES_ARRAY=($FILES)
133+
FILES_JSON=$(echo -n "${FILES_ARRAY[@]}" | jq -R -s -c 'split(" ")')
134+
echo "files_json=${FILES_JSON}" >> $GITHUB_OUTPUT
114135
publish-ruby:
115-
name: "Ruby"
136+
needs: list-ruby-gems
137+
name: "gem push"
116138
runs-on: ubuntu-latest
117139
if: "startsWith(github.event.release.tag_name, 'ruby-')"
118140
env:
119-
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
141+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
142+
strategy:
143+
matrix:
144+
file: ${{ fromJson(needs.list-ruby-gems.outputs.files_json) }}
120145
steps:
121146
- uses: ruby/setup-ruby@v1
122147
with:
@@ -131,4 +156,4 @@ jobs:
131156
token: ${{ secrets.GITHUB_TOKEN }}
132157
- run: |
133158
cd dist
134-
for file in *.gem; do gem push $file; done;
159+
gem push ${{ matrix.file }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Pyroscope
2-
VERSION = '0.5.5'.freeze
2+
VERSION = '0.5.6'.freeze
33
end

0 commit comments

Comments
 (0)