-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.08 KB
/
snapshot.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
name: "Build Snapshots"
on:
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
build:
name: Build and release
runs-on: ubuntu-latest
strategy:
matrix:
goos: [ windows, linux, darwin, freebsd ]
goarch: [ amd64, arm64, riscv64 ]
exclude:
- goarch: "riscv64"
goos: "darwin"
- goarch: "riscv64"
goos: "windows"
steps:
- uses: actions/checkout@v4
- uses: ./
name: "Common Setup"
- name: Build
run: |
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o out/ftb-server-${{ matrix.goos }}-${{ matrix.goarch }} -trimpath -buildvcs=false -ldflags "-s -w -X 'ftb-server-downloader/util.GitCommit=${{env.GITHUB_SHA_SHORT}}' -X 'ftb-server-downloader/util.ReleaseVersion=${{env.GITHUB_REF_NAME}}'"
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: ftb-server-${{ matrix.goos }}-${{ matrix.goarch }}
overwrite: true
path: |
out/*