magpie/.github/workflows/release.yml
Maxfield Luke ddbd19f153 Initial commit on Forgejo
Fresh repository history for elektrine/magpie hosted at
https://git.elektrine.com/elektrine/magpie.
2026-07-29 04:56:34 -04:00

51 lines
1.2 KiB
YAML

name: release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff
with:
go-version-file: go.mod
cache: true
- name: Test
run: go test ./...
- name: Build release artifacts
run: make release VERSION="$GITHUB_REF_NAME" COMMIT="${GITHUB_SHA::7}"
- name: Upload artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: magpie-${{ github.ref_name }}
path: dist/*
publish:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
with:
name: magpie-${{ github.ref_name }}
path: dist
- name: Publish GitHub release
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65
with:
files: dist/*