-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (34 loc) · 1017 Bytes
/
publish.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: Build And Release App
on:
push:
tags:
- 'v*'
workflow_dispatch:
env:
LATEST_TAG: unknown
jobs:
build:
name: build and release app
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- name: Check out git repository
uses: actions/checkout@v4
- name: Get latest tag
run: |
$latestTag = git describe --tags $(git rev-list --tags --max-count=1)
echo "Latest tag is $latestTag"
echo "LATEST_TAG=$latestTag" >> $env:GITHUB_ENV
- name: Build
run: cargo build --release
- name: Compress
run: Compress-Archive -Path assets, target\release\rotor.exe -DestinationPath rotor-${{ env.LATEST_TAG }}.zip
- name: release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: rotor-${{ env.LATEST_TAG }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}