Skip to content

git-filter-tree: v0.0.3 #5

git-filter-tree: v0.0.3

git-filter-tree: v0.0.3 #5

Workflow file for this run

name: CD
on:
release:
types: [released, prereleased]
workflow_dispatch:
permissions:
contents: read
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: true
- name: Package crate
run: cargo package --workspace
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-path: "target/package/*.crate"
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
IS_PRERELEASE: ${{ github.event.release.prerelease }}
run: |
if [ "$IS_PRERELEASE" = "true" ]; then
cargo publish --dry-run
else
cargo publish --token "$CARGO_REGISTRY_TOKEN"
fi