-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (45 loc) · 1.19 KB
/
build-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
name: build
on:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.20.0
cache: true
- run: go test -v ./...
- uses: actions/upload-artifact@v4
with:
name: filediver-win64
path: filediver.exe
release:
runs-on: ubuntu-latest
needs: build-windows
steps:
- uses: actions/download-artifact@v4
with:
name: filediver-win64
- uses: actions/create-release@v1
id: create-new-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_number }}
release_name: Release ${{ github.run_number }}
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-new-release.outputs.upload_url }}
asset_path: ./filediver.exe
asset_name: filediver-win64.exe