Skip to content

Release

Release #18

Workflow file for this run

name: Release
on:
release:
types: [published]
paths:
- "**/*.go"
- "go.mod"
- "go.sum"
- ".github/workflows/*.yml"
jobs:
build:
strategy:
matrix:
build: [macos, macos-arm64, linux]
include:
- build: macos
os: macos-13
archive-name: darwin.tar.gz
- build: macos-arm64
os: macos-latest
archive-name: darwin-arm64.tar.gz
- build: linux
os: ubuntu-22.04
archive-name: linux.tar.gz
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22
- name: Download dependencies
run: go mod download
- name: Build
run: go build -v -o snow .
- name: Prepare Packaging
run: tar zcvf snow-${{ matrix.archive-name }} snow LICENSE
- name: Checksum
run: shasum -a 256 snow-${{ matrix.archive-name }} | tee snow-${{ matrix.archive-name }}.sha256
- name: Release version
uses: softprops/action-gh-release@v2
if: github.event_name == 'release'
with:
files: |
snow-${{ matrix.archive-name }}
snow-${{ matrix.archive-name }}.sha256
token: ${{ secrets.GITHUB_TOKEN }}