mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
ci: add release workflow to publish binaries on tag push
Users without a Go toolchain can now download pre-built binaries directly from GitHub Releases (closes #161). The workflow triggers on v* tags, builds Linux and Windows amd64 archives, and attaches them along with SCHEMA.sql to an auto-generated release. Also fixes the README badge URL (go-improved.yml → go.yml).
This commit is contained in:
83
.github/workflows/release.yml
vendored
Normal file
83
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build ${{ matrix.os_name }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
os_name: Linux-amd64
|
||||||
|
binary: erupe-ce
|
||||||
|
- goos: windows
|
||||||
|
goarch: amd64
|
||||||
|
os_name: Windows-amd64
|
||||||
|
binary: erupe-ce.exe
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.25'
|
||||||
|
|
||||||
|
- name: Download dependencies
|
||||||
|
run: go mod download
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: env GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v -o ${{ matrix.binary }}
|
||||||
|
|
||||||
|
- name: Prepare release archive
|
||||||
|
run: |
|
||||||
|
mkdir -p staging
|
||||||
|
cp ${{ matrix.binary }} staging/
|
||||||
|
cp config.example.json staging/
|
||||||
|
cp -r www/ staging/www/
|
||||||
|
cp -r savedata/ staging/savedata/
|
||||||
|
cp -r schemas/ staging/schemas/
|
||||||
|
# Create a standalone SCHEMA.sql from init schema for convenience
|
||||||
|
cp schemas/init.sql staging/SCHEMA.sql
|
||||||
|
cd staging && zip -r ../erupe-${{ matrix.os_name }}.zip .
|
||||||
|
|
||||||
|
- name: Upload build artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os_name }}
|
||||||
|
path: erupe-${{ matrix.os_name }}.zip
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: Create Release
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Download all artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: artifacts
|
||||||
|
|
||||||
|
- name: Copy SCHEMA.sql for standalone download
|
||||||
|
run: cp schemas/init.sql SCHEMA.sql
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
generate_release_notes: true
|
||||||
|
files: |
|
||||||
|
artifacts/Linux-amd64/erupe-Linux-amd64.zip
|
||||||
|
artifacts/Windows-amd64/erupe-Windows-amd64.zip
|
||||||
|
SCHEMA.sql
|
||||||
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
- CI: Release workflow that automatically builds and uploads Linux/Windows binaries to GitHub Releases on tag push
|
||||||
- Monthly guild item claim tracking per character per type (standard/HLC/EXC), with schema migration (`31-monthly-items.sql`) adding claim timestamps to the `stamps` table
|
- Monthly guild item claim tracking per character per type (standard/HLC/EXC), with schema migration (`31-monthly-items.sql`) adding claim timestamps to the `stamps` table
|
||||||
- API: `GET /version` endpoint returning server name and client mode (`{"clientMode":"ZZ","name":"Erupe-CE"}`)
|
- API: `GET /version` endpoint returning server name and client mode (`{"clientMode":"ZZ","name":"Erupe-CE"}`)
|
||||||
- Rework object ID allocation: per-session IDs replace shared map, simplify stage entry notifications
|
- Rework object ID allocation: per-session IDs replace shared map, simplify stage entry notifications
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Erupe
|
# Erupe
|
||||||
|
|
||||||
[](https://github.com/Mezeporta/Erupe/actions/workflows/go-improved.yml)
|
[](https://github.com/Mezeporta/Erupe/actions/workflows/go.yml)
|
||||||
[](https://github.com/Mezeporta/Erupe/actions/workflows/github-code-scanning/codeql)
|
[](https://github.com/Mezeporta/Erupe/actions/workflows/github-code-scanning/codeql)
|
||||||
[](https://go.dev/)
|
[](https://go.dev/)
|
||||||
[](https://github.com/Mezeporta/Erupe/releases/latest)
|
[](https://github.com/Mezeporta/Erupe/releases/latest)
|
||||||
|
|||||||
Reference in New Issue
Block a user