Update VERSION #1
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 | |
permissions: | |
contents: write | |
on: | |
push: | |
paths: | |
- "VERSION" | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '>1.18' | |
check-latest: true | |
cache: false | |
- name: Install dependencies | |
run: | | |
cd src | |
go mod download | |
- name: Build | |
run: | | |
cd src | |
GOOS=windows GOARCH=amd64 go build -v -ldflags="-s -w" -o picocrypt-windows-amd64.exe Picocrypt.go | |
GOOS=windows GOARCH=arm64 go build -v -ldflags="-s -w" -o picocrypt-windows-arm64.exe Picocrypt.go | |
GOOS=darwin GOARCH=amd64 go build -v -ldflags="-s -w" -o picocrypt-macos-amd64 Picocrypt.go | |
GOOS=darwin GOARCH=arm64 go build -v -ldflags="-s -w" -o picocrypt-macos-arm64 Picocrypt.go | |
GOOS=linux GOARCH=amd64 go build -v -ldflags="-s -w" -o picocrypt-linux-amd64 Picocrypt.go | |
GOOS=linux GOARCH=arm64 go build -v -ldflags="-s -w" -o picocrypt-linux-arm64 Picocrypt.go | |
env: | |
CGO_ENABLED: 1 | |
GOAMD64: v2 | |
- name: Get version tag | |
run: | | |
VERSION=$(cat VERSION) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
picocrypt-windows-amd64.exe | |
picocrypt-windows-arm64.exe | |
picocrypt-macos-amd64 | |
picocrypt-macos-arm64 | |
picocrypt-linux-amd64 | |
picocrypt-linux-arm64 | |
tag_name: ${{ env.VERSION }} | |
make_latest: true |