Skip to content

Commit

Permalink
Create GitHub release action
Browse files Browse the repository at this point in the history
  • Loading branch information
dyoung522 committed Sep 13, 2024
1 parent 1d5e03a commit 7e99506
Showing 1 changed file with 29 additions and 30 deletions.
59 changes: 29 additions & 30 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
# .github/workflows/release.yaml

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- v* # Push events to matching v*, i.e. v1.0, v20.15.10
permissions: read-all
name: Build Release
release:
types: [created]

permissions:
contents: write
packages: write

jobs:
release-darwin-amd64:
name: release darwin/amd64
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: [windows, darwin, linux]
goarch: ["386", amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@master
- name: compile and release
uses: ngs/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: amd64
GOOS: darwin
GO111MODULE: on
EXTRA_FILES: LICENSE README.md
release-windows-amd64:
name: release windows/amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: compile and release
uses: ngs/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GOARCH: amd64
GOOS: windows
GO111MODULE: on
EXTRA_FILES: LICENSE README.md
- uses: actions/checkout@v4
- uses: wangyoucao577/go-release-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
binary_name: esotools
extra_files: LICENSE README.md

0 comments on commit 7e99506

Please sign in to comment.