Skip to content

Commit 5565033

Browse files
authored
Publish actions (#46)
* wip(actions): use different action * wip(actions): fix * wip(actions): fix * wip(actions): add pypi publish action * wip(actions): remove list * wip(actions): fix directory name * wip(actions): publish for ruby * wip(actions): add rubygems api key * wip(actions): use env variable for api key
1 parent e7f293d commit 5565033

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -88,25 +88,37 @@ jobs:
8888
runs-on: ubuntu-latest
8989
if: "startsWith(github.event.release.tag_name, 'python-')"
9090
steps:
91-
- uses: dsaltares/fetch-gh-release-asset@master
92-
with:
93-
version: 'tags/${{ github.event.release.tag_name }}'
94-
regex: true
95-
file: "^pyroscope-io*\\$"
91+
- uses: robinraju/[email protected]
92+
with:
93+
tag: ${{ github.event.release.tag_name }}
94+
fileName: "*"
95+
tarBall: false
96+
zipBall: false
97+
out-file-path: "dist"
9698
token: ${{ secrets.GITHUB_TOKEN }}
97-
- name: list assets
98-
working-directory: ${{ github.workspace }}
99-
run: ls -la
99+
- name: Publish a Python distribution to PyPI
100+
uses: pypa/gh-action-pypi-publish@release/v1
101+
with:
102+
user: __token__
103+
password: ${{ secrets.PYPI_API_TOKEN }}
100104
publish-ruby:
101105
name: "Ruby"
102106
runs-on: ubuntu-latest
103107
if: "startsWith(github.event.release.tag_name, 'ruby-')"
108+
env:
109+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
104110
steps:
105-
- uses: dsaltares/fetch-gh-release-asset@master
111+
- uses: ruby/setup-ruby@v1
106112
with:
107-
version: 'tags/ruby-0.2.2'
108-
file: 'pyroscope-0.3.0.gem'
113+
ruby-version: '3.1'
114+
- uses: robinraju/[email protected]
115+
with:
116+
tag: ${{ github.event.release.tag_name }}
117+
fileName: "*"
118+
tarBall: false
119+
zipBall: false
120+
out-file-path: "dist"
109121
token: ${{ secrets.GITHUB_TOKEN }}
110-
- name: list assets
111-
working-directory: ${{ github.workspace }}
112-
run: ls -la
122+
- run: |
123+
cd dist
124+
for file in *.gem; do gem push $file; done;

0 commit comments

Comments
 (0)