-
Notifications
You must be signed in to change notification settings - Fork 10
77 lines (68 loc) · 1.65 KB
/
build.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
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
75
76
77
name: build
permissions:
contents: write
on:
push:
tags:
- 'v*'
branches:
- '**'
paths:
- '.github/workflows/meta.yml'
- '.github/workflows/build.yml'
- 'assets/**'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/meta.yml'
- '.github/workflows/build.yml'
- 'assets/**'
workflow_dispatch:
jobs:
meta:
uses: ./.github/workflows/meta.yml
build:
needs: meta
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go modules
run: |
go mod download
# release:
# if: ${{ needs.meta.outputs.is_release == 'true' }}
# needs: [meta, build]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/download-artifact@v4
# with:
# path: assets
# - run: |
# mv -vf assets/changelog/* .
# rm -rf assets/changelog
# cd assets
# for f in *; do
# (cd $f && zip -r ../$f-${{ needs.meta.outputs.tag }}.zip .)
# done
# - uses: softprops/action-gh-release@v1
# with:
# body_path: CHANGELOG.md
# files: assets/*
# tag_name: ${{ needs.meta.outputs.tag }}