-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (33 loc) · 1.01 KB
/
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
name: Build And Release App
on:
push:
tags:
- 'v*'
workflow_dispatch:
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@v3
- name: Get latest tag
id: latesttag
run: |
$latestTag = git describe --tags $(git rev-list --tags --max-count=1)
echo "Latest tag is $latestTag"
echo "::set-output name=tag::$latestTag"
- name: Build
run: cargo build --release
- name: Compress
run: Compress-Archive -Path assets, target\release\rotor.exe -DestinationPath rotor-${{ steps.latesttag.outputs.tag }}.zip
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "rotor-${{ steps.latesttag.outputs.tag }}.zip"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}