edit release action
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
name: publish to crates.io
|
name: publish release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "v*"
|
- "v*"
|
||||||
@@ -12,8 +13,23 @@ jobs:
|
|||||||
id-token: write # Required for OIDC token exchange
|
id-token: write # Required for OIDC token exchange
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: rust-lang/crates-io-auth-action@v1
|
- name: check version
|
||||||
id: auth
|
# cut off the v part of the tag to only search for the number
|
||||||
- run: cargo publish
|
run: grep -q "$(echo "${{ github.ref_name }}" | cut -c2-)" Cargo.toml
|
||||||
env:
|
- run: cargo test
|
||||||
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
|
- run: cargo build --release --locked
|
||||||
|
- name: package
|
||||||
|
# TODO: include completions/man page
|
||||||
|
run: tar -azcf hexapoda-linux-x86.zip -C "target/release/" hexapoda
|
||||||
|
- name: release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
draft: true
|
||||||
|
name: "${{ github.ref_name }}"
|
||||||
|
files: hexapoda-linux-x86.zip
|
||||||
|
# TODO: should cargo releases be manual ? just in case it fails on another platform?
|
||||||
|
# - uses: rust-lang/crates-io-auth-action@v1
|
||||||
|
# id: auth
|
||||||
|
# - run: cargo publish
|
||||||
|
# env:
|
||||||
|
# CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
|
||||||
|
|||||||
Reference in New Issue
Block a user