Skip to content

chore: update release workflow 10 #12

chore: update release workflow 10

chore: update release workflow 10 #12

Workflow file for this run

name: release
permissions:
contents: write
on:
push:
branches:
- main
jobs:
release-on-crates-io:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Rust
uses: ATiltedTree/setup-rust@v1
with:
rust-version: stable
- name: Create GitHub release & Publish to crates.io
env:
CRATE_NAME: blockchain-cli
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
# Build release
cargo build --release
# - name: Install cargo-release
# run: cargo install cargo-release
# - name: Create GitHub release & Publish to crates.io
# env:
# CRATE_NAME: blockchain-cli
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
# run: |
# # Set
# git config --global user.email "slavpas@gmail.com"
# git config --global user.name "Slavik Pastushenko"
# # Bump the version and create a GitHub release
# cargo release --execute --no-confirm patch
# # Get the version number from Cargo.toml
# VERSION=$(grep -oP 'version = "\K[^"]+' Cargo.toml)
# # Create a GitHub release using the GitHub CLI
# gh release create v$VERSION target/package/blockchain-cli-*.crate -t "v$VERSION"
release-on-github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}