-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (49 loc) · 1.6 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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 }}