Skip to content

update artifacts

update artifacts #17

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
include:
- goos: linux
goarch: amd64
dir: linux
extension: ""
- goos: linux
goarch: arm64
dir: linux
extension: ""
- goos: windows
goarch: amd64
dir: win
extension: ".exe"
- goos: windows
goarch: arm64
dir: win
extension: ".exe"
- goos: darwin
goarch: amd64
dir: macos
extension: ""
- goos: darwin
goarch: arm64
dir: macos
extension: ""
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '^1.22'
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go mod tidy
- name: Build
run: |
mkdir -p ${{ matrix.dir }}
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -o ${{ matrix.dir }}/rune-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }} ./dist
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.goos }}-${{ matrix.goarch }}
path: ${{ matrix.dir }}/rune-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.extension }}