-
Notifications
You must be signed in to change notification settings - Fork 41
74 lines (63 loc) · 1.89 KB
/
build-tools.yml
File metadata and controls
74 lines (63 loc) · 1.89 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
66
67
68
69
70
71
72
73
74
name: Build Tools
on:
push:
branches: [master]
workflow_dispatch:
concurrency:
group: build-tools
cancel-in-progress: true
jobs:
ensure-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Ensure release exists
env:
GH_TOKEN: ${{ github.token }}
run: gh release create tools --repo "$GITHUB_REPOSITORY" --title "Tools" --latest=false || true
build:
needs: ensure-release
strategy:
matrix:
include:
- os: ubuntu-latest
archive: tools-linux-x64.tar.gz
- os: windows-latest
archive: tools-win-x64.tar.gz
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.x'
- name: Build tools
shell: bash
run: ./tools/build.sh
- name: Create archive
shell: bash
run: ./tools/archive.sh "${{ matrix.archive }}"
- name: Upload to release
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload tools --clobber tools/${{ matrix.archive }}
update-release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Update release notes
env:
GH_TOKEN: ${{ github.token }}
run: gh release edit tools --repo "$GITHUB_REPOSITORY" --notes "Automated tools build from ${GITHUB_SHA::7} on $(date -u +%Y-%m-%d)"