Skip to content

Update release workflow and install.sh #10

Update release workflow and install.sh

Update release workflow and install.sh #10

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Build binaries
run: |
GOOS=linux GOARCH=386 go build -o bin/gpt_cmd-linux-386
GOOS=linux GOARCH=amd64 go build -o bin/gpt_cmd-linux
GOOS=linux GOARCH=arm go build -o bin/gpt_cmd-linux-arm
GOOS=linux GOARCH=arm64 go build -o bin/gpt_cmd-linux-arm64
GOOS=darwin GOARCH=amd64 go build -o bin/gpt_cmd-macos-amd64
GOOS=darwin GOARCH=arm64 go build -o bin/gpt_cmd-macos-arm64
GOOS=windows GOARCH=386 go build -o bin/gpt_cmd-windows-386.exe
GOOS=windows GOARCH=amd64 go build -o bin/gpt_cmd-windows.exe
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: binaries
path: bin/*
retention-days: 1
release:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: binaries
- name: Create release
uses: ncipollo/release-action@v1.14.0
with:
artifacts: 'bin/*'