Skip to content

Remove cache option from release workflow (#12) #2

Remove cache option from release workflow (#12)

Remove cache option from release workflow (#12) #2

Workflow file for this run

name: release
on:
push:
# run only against tags
tags:
- "*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ">=1.22.0"
- run: go generate -v ./...
- run: go vet -v ./...
- run: go test -v ./...
# https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63
- run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o diff-server_${{ github.ref_name }}_darwin_amd64 .
- run: CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o diff-server_${{ github.ref_name }}_darwin_arm64 .
- run: CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -o diff-server_${{ github.ref_name }}_linux_386 .
- run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o diff-server_${{ github.ref_name }}_linux_amd64 .
- run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o diff-server_${{ github.ref_name }}_linux_arm64 .
# create checksums.txt
- run: shasum -a 256 diff-server_* > checksums.txt
- name: Create a Release in a GitHub Action
uses: softprops/action-gh-release@v2
with:
files: |
diff-server_${{ github.ref_name }}_darwin_amd64
diff-server_${{ github.ref_name }}_darwin_arm64
diff-server_${{ github.ref_name }}_linux_386
diff-server_${{ github.ref_name }}_linux_amd64
diff-server_${{ github.ref_name }}_linux_arm64
checksums.txt