Skip to content

Commit

Permalink
ci: add publishing to crates.io
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Oct 27, 2023
1 parent e8dcbf3 commit 1c1e9aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/upload-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
shell: bash

env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
EXE_SUFFIX: ${{ matrix.os == 'windows-latest' && '.exe' || '' }}

steps:
Expand All @@ -47,7 +48,12 @@ jobs:
export BINARY_NAME="${{ inputs.executable }}-$(rustc --version --verbose | grep host | cut -d ' ' -f 2)${EXE_SUFFIX}"
mv "target/release/${{ inputs.executable }}${EXE_SUFFIX}" "./${BINARY_NAME}"
echo "{binary}={${BINARY_NAME}}" >> $GITHUB_OUTPUT
echo "binary=${BINARY_NAME}" >> $GITHUB_OUTPUT
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p ${{ inputs.member }} ${{ env.ACT && '--dry-run' }}

- name: Upload to release
env:
Expand Down

0 comments on commit 1c1e9aa

Please sign in to comment.