Skip to content

Update dep versions and go version in github actions file #146

Update dep versions and go version in github actions file

Update dep versions and go version in github actions file #146

Workflow file for this run

name: Build Go Project and Create Release
on:
push:
branches: [release]
permissions:
contents: write
jobs:
build_and_release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04]
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.26.5"
- name: Linux
if: matrix.os == 'ubuntu-24.04'
run: |
CGO_ENABLED=0 go build -ldflags="-s -w" -o tgpt-linux-amd64
CGO_ENABLED=0 GOARCH=386 go build -ldflags="-s -w" -o tgpt-linux-i386
CGO_ENABLED=0 GOARCH=arm64 go build -ldflags="-s -w" -o tgpt-linux-arm64
CGO_ENABLED=0 GOARCH=arm go build -ldflags="-s -w" -o tgpt-linux-arm
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o tgpt-amd64.exe
GOOS=windows GOARCH=arm go build -ldflags="-s -w" -o tgpt-arm.exe
GOOS=windows GOARCH=arm64 go build -ldflags="-s -w" -o tgpt-arm64.exe
GOOS=windows GOARCH=386 go build -ldflags="-s -w" -o tgpt-i386.exe
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o tgpt-mac-amd64
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o tgpt-mac-arm64
GOOS=netbsd GOARCH=amd64 go build -ldflags="-s -w" -o tgpt-netbsd-amd64
GOOS=netbsd GOARCH=arm64 go build -ldflags="-s -w" -o tgpt-netbsd-arm64
GOOS=netbsd GOARCH=arm go build -ldflags="-s -w" -o tgpt-netbsd-arm
GOOS=netbsd GOARCH=386 go build -ldflags="-s -w" -o tgpt-netbsd-i386
GOOS=freebsd GOARCH=amd64 go build -ldflags="-s -w" -o tgpt-freebsd-amd64
GOOS=freebsd GOARCH=arm64 go build -ldflags="-s -w" -o tgpt-freebsd-arm64
GOOS=freebsd GOARCH=arm go build -ldflags="-s -w" -o tgpt-freebsd-arm
GOOS=freebsd GOARCH=386 go build -ldflags="-s -w" -o tgpt-freebsd-i386
echo "## Changelog:" >> ${{ github.workspace }}-CHANGELOG.txt
echo "<details><summary>SHA256 Hashes</summary><code>" >> ${{ github.workspace }}-CHANGELOG.txt
echo "SHA256 hashes of the built binaries:"
echo "SHA256 hashes of the built binaries:" >> ${{ github.workspace }}-CHANGELOG.txt
sha256sum tgpt-linux-amd64
sha256sum tgpt-linux-amd64 >> ${{ github.workspace }}-CHANGELOG.txt
sha256sum tgpt-linux-i386
sha256sum tgpt-linux-i386 >> ${{ github.workspace }}-CHANGELOG.txt
sha256sum tgpt-linux-arm64
sha256sum tgpt-linux-arm64 >> ${{ github.workspace }}-CHANGELOG.txt
sha256sum tgpt-linux-arm
sha256sum tgpt-linux-arm >> ${{ github.workspace }}-CHANGELOG.txt
sha256sum tgpt-amd64.exe
sha256sum tgpt-amd64.exe >> ${{ github.workspace }}-CHANGELOG.txt
sha256sum tgpt-i386.exe
sha256sum tgpt-i386.exe >> ${{ github.workspace }}-CHANGELOG.txt
sha256sum tgpt-mac-amd64
sha256sum tgpt-mac-amd64 >> ${{ github.workspace }}-CHANGELOG.txt
sha256sum tgpt-mac-arm64
sha256sum tgpt-mac-arm64 >> ${{ github.workspace }}-CHANGELOG.txt
echo "</code></details>" >> ${{ github.workspace }}-CHANGELOG.txt
- name: Upload Artifacts
id: upload-artifacts
uses: softprops/action-gh-release@v3
with:
files: |
tgpt-linux-amd64
tgpt-linux-i386
tgpt-linux-arm64
tgpt-linux-arm
tgpt-amd64.exe
tgpt-i386.exe
tgpt-arm.exe
tgpt-arm64.exe
tgpt-mac-amd64
tgpt-mac-arm64
tgpt-netbsd-amd64
tgpt-netbsd-arm64
tgpt-netbsd-arm
tgpt-netbsd-i386
tgpt-freebsd-amd64
tgpt-freebsd-arm64
tgpt-freebsd-arm
tgpt-freebsd-i386
tgpt-openbsd-amd64
tgpt-openbsd-arm64
tgpt-openbsd-arm
tgpt-openbsd-i386
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
tag_name: v
name: tgpt
body_path: ${{ github.workspace }}-CHANGELOG.txt