Skip to content

Commit 69c2079

Browse files
committed
fix(ruby-publish): make ruby publish non concurrent
1 parent 2b0f543 commit 69c2079

File tree

3 files changed

+40
-49
lines changed

3 files changed

+40
-49
lines changed

.github/workflows/publish-ruby.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish Gems
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [published]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
push-ruby-gems:
13+
name: "Push ruby gems"
14+
runs-on: ubuntu-latest
15+
if: "startsWith(github.event.release.tag_name, 'ruby-')"
16+
outputs:
17+
files_json: ${{ steps.list-files.outputs.files_json }}
18+
steps:
19+
- uses: robinraju/release-downloader@daf26c55d821e836577a15f77d86ddc078948b05 # 1.12
20+
with:
21+
tag: ${{ github.event.release.tag_name }}
22+
fileName: "*"
23+
tarBall: false
24+
zipBall: false
25+
out-file-path: "dist"
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
- uses: ruby/setup-ruby@dffc446db9ba5a0c4446edb5bca1c5c473a806c5 # v1.235.0
28+
with:
29+
ruby-version: '3.1'
30+
- run: |
31+
set -ex
32+
cd dist
33+
for gem in $(ls dist);
34+
do
35+
gem push "${gem}";
36+
sleep 5;
37+
done
38+

.github/workflows/publish.yml

Lines changed: 1 addition & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -88,51 +88,4 @@ jobs:
8888
with:
8989
user: __token__
9090
password: ${{ secrets.PYPI_API_TOKEN }}
91-
list-ruby-gems:
92-
name: "List ruby gems"
93-
runs-on: ubuntu-latest
94-
if: "startsWith(github.event.release.tag_name, 'ruby-')"
95-
outputs:
96-
files_json: ${{ steps.list-files.outputs.files_json }}
97-
steps:
98-
- uses: robinraju/release-downloader@daf26c55d821e836577a15f77d86ddc078948b05 # 1.12
99-
with:
100-
tag: ${{ github.event.release.tag_name }}
101-
fileName: "*"
102-
tarBall: false
103-
zipBall: false
104-
out-file-path: "dist"
105-
token: ${{ secrets.GITHUB_TOKEN }}
106-
- id: list-files
107-
run: |
108-
FILES=$(ls dist)
109-
FILES_ARRAY=($FILES)
110-
FILES_JSON=$(echo -n "${FILES_ARRAY[@]}" | jq -R -s -c 'split(" ")')
111-
echo "files_json=${FILES_JSON}" >> $GITHUB_OUTPUT
112-
publish-ruby:
113-
needs: list-ruby-gems
114-
name: "gem push"
115-
runs-on: ubuntu-latest
116-
if: "startsWith(github.event.release.tag_name, 'ruby-')"
117-
env:
118-
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
119-
strategy:
120-
matrix: # TODO get rid of list-ruby-gems step
121-
file: ${{ fromJson(needs.list-ruby-gems.outputs.files_json) }}
122-
steps:
123-
- uses: ruby/setup-ruby@dffc446db9ba5a0c4446edb5bca1c5c473a806c5 # v1.235.0
124-
with:
125-
ruby-version: '3.1'
126-
- uses: robinraju/release-downloader@daf26c55d821e836577a15f77d86ddc078948b05 # 1.12
127-
with:
128-
tag: ${{ github.event.release.tag_name }}
129-
fileName: "*"
130-
tarBall: false
131-
zipBall: false
132-
out-file-path: "dist"
133-
token: ${{ secrets.GITHUB_TOKEN }}
134-
- run: |
135-
cd dist
136-
gem push ${GEM_FILE}
137-
env:
138-
GEM_FILE: ${{ matrix.file }}
91+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Pyroscope
2-
VERSION = '0.6.1'.freeze
2+
VERSION = '0.6.2'.freeze
33
end

0 commit comments

Comments
 (0)