-
Notifications
You must be signed in to change notification settings - Fork 19
44 lines (43 loc) · 1.33 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
name: release
on:
push:
tags:
- "*"
jobs:
release:
name: "Release"
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: gfold
asset_name: gfold-linux-gnu-x86-64
- os: windows-latest
artifact_name: gfold.exe
asset_name: gfold-windows-x86-64.exe
- os: macos-latest
artifact_name: gfold
asset_name: gfold-darwin-aarch64
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- run: cargo build --release --locked
- shell: bash
run: |
if [ $(echo ${{ github.ref }} | grep "rc") ]; then
echo "PRERELEASE=true" >> $GITHUB_ENV
echo "PRERELEASE=true"
else
echo "PRERELEASE=false" >> $GITHUB_ENV
echo "PRERELEASE=false"
fi
echo $PRERELEASE
mv target/release/${{ matrix.artifact_name }} ${{ matrix.asset_name }}
- uses: softprops/action-gh-release@v2
with:
files: ${{ matrix.asset_name }}
prerelease: ${{ env.PRERELEASE }}
body: "Please refer to **[CHANGELOG.md](https://github.com/nickgerace/gfold/blob/main/CHANGELOG.md)** for information on this release."