Remove Docker and non-Windows builds from release process

This commit updates the GitHub Actions workflow, GoReleaser config, and Makefile to only build and release Windows/amd64 binaries. Docker image builds, multi-arch support, and related configuration have been removed to simplify the release process and focus on Windows releases.
This commit is contained in:
lx1056758714-glitch
2025-12-18 21:52:28 +08:00
parent 428dabe05a
commit f577b3956d
3 changed files with 7 additions and 212 deletions

View File

@@ -1,145 +1,53 @@
name: Release
on:
push:
tags:
- 'v*'
branches:
- main
env:
IMAGE_NAME: ${{ github.repository }}
jobs:
release:
name: Release Binary and Docker
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: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to Docker Hub
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- 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/chatlog_windows_amd64_v1/chatlog.exe
path: dist/chatlog_windows_amd64_v1/chatlog.exe