pyroscope-lib-0.5.8 #81
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to crates.io | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
publish-pyroscope: | |
name: pyroscope-lib | |
runs-on: ubuntu-latest | |
if: "startsWith(github.event.release.tag_name, 'lib-')" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: 1.82.0 | |
- name: publish pyroscope crate | |
continue-on-error: true | |
run: | | |
cargo login ${{ secrets.CARGO_TOKEN }} | |
cargo publish | |
# publish-cli: | |
# name: pyroscope-cli | |
# runs-on: ubuntu-latest | |
# if: "startsWith(github.event.release.tag_name, 'cli-')" | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# submodules: recursive | |
# - uses: dtolnay/rust-toolchain@v1 | |
# with: | |
# toolchain: 1.82.0 | |
# - name: install libunwind (for pprof) | |
# run: sudo apt install libunwind8-dev | |
# - name: publish pyroscope crate | |
# continue-on-error: true | |
# run: | | |
# cargo login ${{ secrets.CARGO_TOKEN }} | |
# cargo publish --manifest-path pyroscope_cli/Cargo.toml | |
publish-pprofrs: | |
name: "Backend: pprofrs" | |
runs-on: ubuntu-latest | |
if: "startsWith(github.event.release.tag_name, 'pprofrs-')" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: 1.82.0 | |
- name: publish pprofrs crate | |
continue-on-error: true | |
run: | | |
cargo login ${{ secrets.CARGO_TOKEN }} | |
cargo publish --manifest-path pyroscope_backends/pyroscope_pprofrs/Cargo.toml | |
publish-rbspy: | |
name: "Backend: rbspy" | |
runs-on: ubuntu-latest | |
if: "startsWith(github.event.release.tag_name, 'rbspy-')" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: 1.82.0 | |
- name: publish rbspy crate | |
continue-on-error: true | |
run: | | |
cargo login ${{ secrets.CARGO_TOKEN }} | |
cargo publish --manifest-path pyroscope_backends/pyroscope_rbspy/Cargo.toml | |
publish-pyspy: | |
name: "Backend: pyspy" | |
runs-on: ubuntu-latest | |
if: "startsWith(github.event.release.tag_name, 'pyspy-')" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: 1.82.0 | |
- name: publish pyspy crate | |
continue-on-error: true | |
run: | | |
cargo login ${{ secrets.CARGO_TOKEN }} | |
cargo publish --manifest-path pyroscope_backends/pyroscope_pyspy/Cargo.toml | |
publish-python: | |
name: "Python" | |
runs-on: ubuntu-latest | |
if: "startsWith(github.event.release.tag_name, 'python-')" | |
steps: | |
- uses: robinraju/release-downloader@v1 | |
with: | |
tag: ${{ github.event.release.tag_name }} | |
fileName: "*" | |
tarBall: false | |
zipBall: false | |
out-file-path: "dist" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish a Python distribution to PyPI | |
uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
list-ruby-gems: | |
name: "List ruby gems" | |
runs-on: ubuntu-latest | |
if: "startsWith(github.event.release.tag_name, 'ruby-')" | |
outputs: | |
files_json: ${{ steps.list-files.outputs.files_json }} | |
steps: | |
- uses: robinraju/release-downloader@v1 | |
with: | |
tag: ${{ github.event.release.tag_name }} | |
fileName: "*" | |
tarBall: false | |
zipBall: false | |
out-file-path: "dist" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- id: list-files | |
run: | | |
FILES=$(ls dist) | |
FILES_ARRAY=($FILES) | |
FILES_JSON=$(echo -n "${FILES_ARRAY[@]}" | jq -R -s -c 'split(" ")') | |
echo "files_json=${FILES_JSON}" >> $GITHUB_OUTPUT | |
publish-ruby: | |
needs: list-ruby-gems | |
name: "gem push" | |
runs-on: ubuntu-latest | |
if: "startsWith(github.event.release.tag_name, 'ruby-')" | |
env: | |
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | |
strategy: | |
matrix: | |
file: ${{ fromJson(needs.list-ruby-gems.outputs.files_json) }} | |
steps: | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
- uses: robinraju/release-downloader@v1 | |
with: | |
tag: ${{ github.event.release.tag_name }} | |
fileName: "*" | |
tarBall: false | |
zipBall: false | |
out-file-path: "dist" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
cd dist | |
gem push ${{ matrix.file }} |