-
Notifications
You must be signed in to change notification settings - Fork 5
84 lines (70 loc) · 1.98 KB
/
manual-trigger.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
78
79
80
81
82
83
84
name: Mannual Trigger Workflow
on:
workflow_dispatch:
inputs:
branch_name:
description: 'Branch name to checkout'
required: true
default: 'dev'
jobs:
linux-part:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch_name }}
- name: "Build Changelog"
id: build_changelog
uses: mikepenz/release-changelog-builkkder-action@v4
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
commitMode: true
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: go.mod
- name: Install system dependencies
run: sudo apt-get install -y gcc-mingw-w64-x86-64 gcc-aarch64-linux-gnu
- name: Install dependencies
run: go mod tidy
- name: Build
run: |
bash scripts/build.sh linux amd64
bash scripts/build.sh linux arm64
bash scripts/build.sh windows amd64
- name: echo changelog
run: echo ${{steps.build_changelog.outputs.changelog}}
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
path: build
if-no-files-found: error
retention-days: 15
mac-part:
if: startsWith(github.ref, 'refs/tags/')
runs-on: macos-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
check-latest: true
go-version-file: go.mod
- name: Install dependencies
run: go mod tidy
- name: Build
run: |
bash scripts/build.sh darwin arm64
bash scripts/build.sh darwin amd64
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
path: build
if-no-files-found: error
retention-days: 15