Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cubny authored Feb 17, 2024
1 parent 2f63317 commit cbda3cb
Showing 1 changed file with 31 additions and 21 deletions.
52 changes: 31 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
name: Build Binaries
name: Release
on:
workflow_dispatch:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
release:
types: [created]

permissions:
contents: write
packages: write

jobs:
build:
name: Build
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
# build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- name: Set up Golang
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Checkout
uses: actions/checkout@v4
- name: Compile binaries
run: make build
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: binaries
path: lite-reader-*
if-no-files-found: error
retention-days: 5
- uses: actions/checkout@v4
- uses: wangyoucao577/go-release-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://go.dev/dl/go1.22.0.linux-amd64.tar.gz"
pre_command: export CGO_ENABLED=1
project_path: "./cmd"
binary_name: "lite-reader"
extra_files: README.md public

0 comments on commit cbda3cb

Please sign in to comment.