ci: Automatically publish to crates.io

This commit is contained in:
kayibal
2025-03-27 14:56:58 +01:00
committed by Alan Höng
parent 0836bf7d53
commit 0ff92c5da2

30
.github/workflows/release.yaml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Release
on:
workflow_dispatch:
inputs: { }
release:
types: [ created, prereleased ]
permissions:
id-token: write
contents: write
jobs:
publish-crate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Push to crates.io
run: |
cargo publish --locked --verbose --token ${{ secrets.CRATESIO_REGISTRY_TOKEN }}
# we can't use the action because it errors on github dependencies in any workspace crate
# - uses: katyo/publish-crates@v2
# with:
# path: "./tycho-common"
# registry-token: ${{ secrets.CRATESIO_REGISTRY_TOKEN }}