Skip to content

feat: add SHA256SUMS file #24

feat: add SHA256SUMS file

feat: add SHA256SUMS file #24

Workflow file for this run

name: Build and Release
on:
push:
branches:
- main
- feat/*
tags:
- v*
jobs:
build-and-release:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version: stable
- name: Build
env:
CGO_ENABLED: 0
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
GOOS=$GOOS GOARCH=$GOARCH go build -trimpath -o build/raiden ./cmd/raiden/main.go
cd build
if [[ $GOOS == 'darwin' ]]; then
cp raiden raiden-macos-"$GOARCH"
sha256sum -b raiden-macos-"$GOARCH" >> SHA256SUMS
elif [[ $GOOS == 'windows' ]]; then
mv raiden raiden.exe
sudo apt-get install -y nsis
makensis -NOCD -DARCH="$GOARCH" ${GITHUB_WORKSPACE}/scripts/windows.nsi
sha256sum -b raiden-"$GOOS"-"$GOARCH" >> SHA256SUMS
else
cp raiden raiden-"$GOOS"-"$GOARCH"
sha256sum -b raiden-"$GOOS"-"$GOARCH" >> SHA256SUMS
fi
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files:
build/raiden-*
SHA256SUMS
make_latest: true
generate_release_notes: true