Skip to content

Release

Release #6

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
ci:
uses: ./.github/workflows/ci.yml
build:
needs: ci
strategy:
matrix:
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
- os: ubuntu-latest
goos: linux
goarch: arm64
- os: macos-latest
goos: darwin
goarch: amd64
- os: macos-latest
goos: darwin
goarch: arm64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v3
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
go build -ldflags="-s -w -X jjtask/cmd/jjtask/cmd.Version=$VERSION" -o jjtask-go ./cmd/jjtask
tar -czf jjtask-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz jjtask-go
- uses: actions/upload-artifact@v6
with:
name: jjtask-${{ matrix.goos }}-${{ matrix.goarch }}
path: jjtask-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/download-artifact@v7
with:
path: artifacts
merge-multiple: true
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: artifacts/*.tar.gz
generate_release_notes: true