-
Notifications
You must be signed in to change notification settings - Fork 21
65 lines (52 loc) · 1.74 KB
/
Copy pathdeploy.yml
File metadata and controls
65 lines (52 loc) · 1.74 KB
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
name: deploy
permissions:
contents: write # required to make a release
on:
push:
tags:
- "v*.*.*"
jobs:
create-binaries:
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
- name: Install nasm
run: |
$NASM_VERSION="3.01"
$LINK="https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64"
curl -LO "$LINK/nasm-$NASM_VERSION-win64.zip"
7z e -y "nasm-$NASM_VERSION-win64.zip" -o"C:\nasm"
echo "C:\nasm" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install Rust
run: |
rustup install --profile minimal stable
rustup override set stable
- name: Build
run: cargo build --release --locked
- name: Upload binaries
uses: actions/upload-artifact@v7
with:
name: av-scenechange-bins
path: target/release/av-scenechange.exe
deploy:
needs: create-binaries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Download and decompress the binaries
uses: actions/download-artifact@v8
- name: Handle release data and files
id: data
run: |
VERSION=$(grep -m 1 '^## Version' CHANGELOG.md | sed 's/## Version //')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
awk 'BEGIN{p=0} /^## Version/{if(p) exit; p=1; next} p{print}' CHANGELOG.md > CHANGELOG.txt
strip av-scenechange.exe
- name: Create a release
uses: softprops/action-gh-release@v3
with:
name: Version ${{ steps.data.outputs.version }}
body_path: CHANGELOG.txt
files: av-scenechange.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}