This repository has been archived by the owner on May 22, 2024. It is now read-only.
v0.8.3 #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build binaries for release | |
on: | |
release: | |
types: [created] | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
releases-matrix: | |
name: Release Go binaries | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goos: [darwin, freebsd, linux, openbsd, windows] | |
goarch: ["386", amd64, arm, arm64] | |
exclude: | |
- goarch: "386" | |
goos: darwin | |
- goarch: arm | |
goos: darwin | |
- goarch: arm64 | |
goos: windows | |
steps: | |
- name: "Setup Node.js" | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- uses: actions/checkout@v3 | |
- name: "Update build.go" | |
run: | | |
echo "package main" > ./build.go && | |
echo "" >> ./build.go && | |
echo "import \"runtime\"" >> ./build.go && | |
echo "" >> ./build.go && | |
echo "const AppVersion = \"$(echo ${GITHUB_REF#refs/tags/} | cut -c 2-)\"" >> ./build.go && | |
echo "const BuildArch = runtime.GOARCH" >> ./build.go && | |
echo "const BuildOS = runtime.GOOS" >> ./build.go | |
- name: "Build UI" | |
run: "cd ./.ui-dev && npm install && npm run build" | |
- uses: wangyoucao577/go-release-action@v1 | |
with: | |
retry: 10 | |
overwrite: true | |
github_token: ${{ secrets.GH_PAT }} | |
goos: ${{ matrix.goos }} | |
goarch: ${{ matrix.goarch }} | |
goversion: "1.20" | |
md5sum: false | |
sha256sum: true | |
project_path: "./" | |
binary_name: "egpt" | |
extra_files: LICENSE |