-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.4 KB
/
build_embed_code.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
name: Build and Commit Embed Code
on:
pull_request:
branches: [ embed-code-go ]
concurrency:
group: building
cancel-in-progress: true
jobs:
build:
if: github.actor != 'github-actions[bot]'
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22.1'
- name: Build embed_code.go for Windows
if: matrix.os == 'windows-latest'
run: |
cd ./embed-code-go/
go build -o ./bin/embed-code-win.exe ./embed_code.go
- name: Build embed_code.go for Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
cd ./embed-code-go/
go build -o ./bin/embed-code-ubuntu ./embed_code.go
- name: Build embed_code.go for MacOS
if: matrix.os == 'macos-latest'
run: |
cd ./embed-code-go/
go build -o ./bin/embed-code-macos ./embed_code.go
- name: Commit built files
uses: EndBug/add-and-commit@v9
with:
add: './embed-code-go/bin --force'
message: 'Build embed_code.go for ${{ matrix.os }}'
default_author: github_actions