Files
chatlog_alpha/.github/workflows/release.yml
lx1056758714-glitch 4993398ffd Update artifact upload path and build ID
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.
2025-12-18 21:57:55 +08:00

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