-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (67 loc) · 1.85 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build Release Artifacts
on:
push:
tags:
- '*'
jobs:
build-binary:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure rustc version
run: |
# use the version defined in gluwa/creditcoin3
RUSTC_VERSION=$(curl --silent https://raw.githubusercontent.com/gluwa/creditcoin3/dev/rust-toolchain.toml | grep channel | tail -n1 | tr -d " " | cut -f2 -d'"')
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUSTC_VERSION }}
profile: minimal
override: true
- name: Figure out tag name
shell: bash
run: |
TAG_NAME=$(git describe --tag)
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
- name: DEBUG
shell: bash
run: |
echo "Tag is '${{ env.TAG_NAME }}'"
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Upload binary
uses: actions/upload-artifact@v3
with:
path: 'target/release/creditcoin-fork'
if-no-files-found: error
create-release:
runs-on: ubuntu-24.04
needs:
- build-binary
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Figure out tag name
shell: bash
run: |
TAG_NAME=$(git describe --tag)
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
- name: Download binaries
uses: actions/download-artifact@v3
- name: DEBUG
shell: bash
run: |
ls -lR
- name: Make the release
uses: softprops/action-gh-release@v1
with:
files: 'artifact/creditcoin-*'
fail_on_unmatched_files: true
name: ${{ env.TAG_NAME }}