Skip to content

Bump actions/download-artifact from 4 to 7 #129

Bump actions/download-artifact from 4 to 7

Bump actions/download-artifact from 4 to 7 #129

Workflow file for this run

name: Build and Release
on:
push:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
attestations: write
contents: read
strategy:
matrix:
include:
# macOS
- goos: darwin
goarch: amd64
name: macos-amd64
ext: ""
- goos: darwin
goarch: arm64
name: macos-arm64
ext: ""
# Windows (arm64 not supported - npipe library lacks ARM64 syscall bindings)
- goos: windows
goarch: amd64
name: windows-amd64
ext: ".exe"
- goos: windows
goarch: 386
name: windows-386
ext: ".exe"
# Linux
- goos: linux
goarch: amd64
name: linux-amd64
ext: ""
- goos: linux
goarch: arm64
name: linux-arm64
ext: ""
- goos: linux
goarch: arm
name: linux-arm
ext: ""
- goos: linux
goarch: 386
name: linux-386
ext: ""
# FreeBSD
- goos: freebsd
goarch: amd64
name: freebsd-amd64
ext: ""
- goos: freebsd
goarch: arm64
name: freebsd-arm64
ext: ""
steps:
- uses: actions/checkout@v6
- name: Set binary name
run: echo "BINARY_NAME=lfm-cli-${{ matrix.name }}-${{ github.ref_name }}${{ matrix.ext }}" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: go build -o "${{ env.BINARY_NAME }}" -v .
- name: Attest build provenance
uses: actions/attest-build-provenance@v2
with:
subject-path: "${{ env.BINARY_NAME }}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: lfm-cli-${{ matrix.name }}
path: lfm-cli-*
release:
needs: build
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v7
with:
path: artifacts
merge-multiple: true
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/lfm-cli-*