Add automated releases with binaries and simplify CI workflow
- Add GoReleaser configuration for Linux binaries (amd64, arm64) - Add release job to GitHub Actions for tagged versions - Remove github.server_url validations (Gitea CI disabled) - Update README with binary download instructions - Releases will include compiled binaries and changelogs
This commit is contained in:
@@ -11,7 +11,6 @@ jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
if: github.server_url == 'https://github.com'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -35,7 +34,6 @@ jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
if: github.server_url == 'https://github.com'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -55,11 +53,38 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test, lint]
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.21'
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v5
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
build:
|
||||
name: Build and Push Docker Image
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test, lint]
|
||||
if: github.event_name == 'push' && github.server_url == 'https://github.com'
|
||||
if: github.event_name == 'push'
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
Reference in New Issue
Block a user