mirror of
https://github.com/teest114514/chatlog_alpha.git
synced 2026-03-22 10:48:23 +08:00
Changed the artifact upload path in the release workflow to include all .exe files in the dist directory. Also updated the build ID from 'chatlog-builds' to 'chatlog' in .goreleaser.yaml for consistency.
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
jobs:
|
|
release:
|
|
name: Release Binary
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: goreleaser/goreleaser-cross:v1.24
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Fix git permissions
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
|
|
- name: Install UPX
|
|
uses: crazy-max/ghaction-upx@v3
|
|
with:
|
|
install-only: true
|
|
|
|
- name: Run GoReleaser (Release)
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: goreleaser release --clean
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run GoReleaser (Snapshot)
|
|
if: "!startsWith(github.ref, 'refs/tags/')"
|
|
run: goreleaser build --snapshot --clean
|
|
|
|
- name: Upload Artifacts
|
|
if: "!startsWith(github.ref, 'refs/tags/')"
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: chatlog-snapshot
|
|
path: dist/**/*.exe |