Repository navigation
73 lines (61 loc) · 2.02 KB
/
Copy pathcli.yaml
File metadata and controls
73 lines (61 loc) · 2.02 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
name: Continuous build
on:
workflow_run:
workflows: ["Test"]
types: [completed]
branches: ["main"]
permissions:
contents: read
concurrency:
group: continuous-build
cancel-in-progress: true
jobs:
build:
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_branch == 'main' &&
github.event.workflow_run.head_repository.full_name == github.repository
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.workflow_run.head_sha }}"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26.9"
- name: Test
run: go test -v ./...
- name: Build
run: |
go build -trimpath -o rfw-linux-amd64 \
-ldflags="-s -w -X 'github.com/rfwlab/rfw/v2/core.version=${{ github.event.workflow_run.head_sha }}'" \
./cmd/rfw/main.go
sha256sum rfw-linux-amd64 > checksums.txt
- uses: actions/upload-artifact@v4
with:
name: continuous-rfw
path: |
rfw-linux-amd64
checksums.txt
publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: continuous-rfw
- uses: softprops/action-gh-release@v2
with:
token: "${{ secrets.GITHUB_TOKEN }}"
tag_name: "continuous"
prerelease: true
name: "Continuous Build"
files: |
rfw-linux-amd64
checksums.txt