Skip to content

Commit

Permalink
ci: upload to crates.io
Browse files Browse the repository at this point in the history
  • Loading branch information
kabouzeid committed Jul 28, 2024
1 parent ba3bbe4 commit faad7c5
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10
MACOSX_DEPLOYMENT_TARGET: 10.7
Expand Down Expand Up @@ -120,16 +121,6 @@ jobs:
name: ${{ matrix.name }}
path: ${{ matrix.name }}

- name: Release | Cargo Publish
# run only once
if: matrix.target == 'x86_64-unknown-linux-gnu'
uses: actions-rs/cargo@v1.0.3
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
with:
command: publish
continue-on-error: true

# Create GitHub release with Rust build targets and release notes
upload_artifacts:
name: Add Build Artifacts to Release
Expand All @@ -149,3 +140,14 @@ jobs:
with:
files: turm-*/turm-*
tag_name: ${{ needs.release_please.outputs.tag_name }}

cargo_publish:
name: Publish to crates.io
needs: [upload_artifacts] # only publish if everything else worked
runs-on: ubuntu-latest
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Publish
run: cargo publish

0 comments on commit faad7c5

Please sign in to comment.