Skip to content

Build Snapshots

Build Snapshots #21

Workflow file for this run

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 }} -ldflags "-X 'ftb-server-downloader/util.GitCommit=$GITHUB_SHA_SHORT' -X 'ftb-server-downloader/util.ReleaseVersion=99.99.99-Dev'"
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: ftb-server-${{ matrix.goos }}-${{ matrix.goarch }}
overwrite: true
path: |
out/*