mirror of
https://github.com/jmic/altcha-lib-rs.git
synced 2026-01-25 04:16:40 +00:00
add publish github workflow
This commit is contained in:
34
.github/workflows/publish.yml
vendored
Normal file
34
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Publish to crates.io
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
discussions: write
|
||||
|
||||
jobs:
|
||||
build-test-publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: brndnmtthws/rust-action@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- run: cargo build
|
||||
- run: cargo test
|
||||
- run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
|
||||
- run: cargo publish
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
draft: false
|
||||
prerelease: false
|
||||
discussion_category_name: General
|
||||
generate_release_notes: true
|
||||
Reference in New Issue
Block a user