mirror of
https://github.com/teest114514/chatlog_alpha.git
synced 2026-03-20 08:47:58 +08:00
Update release workflow for main branch builds
Modified the release workflow to use 'goreleaser release' for main branch builds and added a step to update the 'latest' prerelease on GitHub with development builds from the main branch. This improves automation and makes the latest development artifacts easily accessible for testing.
This commit is contained in:
23
.github/workflows/release.yml
vendored
23
.github/workflows/release.yml
vendored
@@ -41,13 +41,28 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Run GoReleaser (Snapshot)
|
||||
if: "!startsWith(github.ref, 'refs/tags/')"
|
||||
run: goreleaser build --snapshot --clean
|
||||
- name: Run GoReleaser (Main Branch Build)
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: goreleaser release --snapshot --clean
|
||||
|
||||
- name: Update Latest Release
|
||||
if: github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: latest
|
||||
name: "Latest Development Build"
|
||||
body: "这是来自 main 分支的最新自动构建版本。仅供开发测试使用。"
|
||||
prerelease: true
|
||||
make_latest: false
|
||||
files: |
|
||||
dist/**/*.exe
|
||||
dist/**/*.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: "!startsWith(github.ref, 'refs/tags/')"
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: chatlog-snapshot
|
||||
path: dist/chatlog_windows_amd64_v1/chatlog.exe
|
||||
path: dist/chatlog_windows_amd64_v1/chatlog.exe
|
||||
|
||||
Reference in New Issue
Block a user