Skip to content

revert checksum changes (#332) #40

revert checksum changes (#332)

revert checksum changes (#332) #40

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
jobs:
create-release:
name: Create Release
runs-on: "ubuntu-latest"
steps:
# Install golang
- uses: actions/setup-go@v5
with:
go-version: "^1.21"
# Checkout code
- uses: actions/checkout@v4
# Install golang deps, using a cache
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ubuntu-latest-1.21-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
ubuntu-latest-1.21-go-
# build binaries for all supported environments
- run: sudo apt update && sudo apt install -y make
- run: make build-all
# Create the binary checksums
- name: Get the version
id: get_version
run: echo VERSION=${GITHUB_REF#refs/tags/v} >> $GITHUB_OUTPUT
- name: Create checksums
run: |
readonly BUILD_DIR="build/${{ steps.get_version.outputs.VERSION }}"
find "$BUILD_DIR" -type f -exec sha256sum {} + | awk -v build_dir="$BUILD_DIR" '{sub("^"build_dir"/", ""); print $1, $2}' > SHA256SUMS
find "$BUILD_DIR" -type f -exec sha512sum {} + | awk -v build_dir="$BUILD_DIR" '{sub("^"build_dir"/", ""); print $1, $2}' > SHA512SUMS
# Create the release
- uses: "marvinpinto/action-automatic-releases@d68defdd11f9dcc7f52f35c1b7c236ee7513bcc1"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
build/${{ steps.get_version.outputs.VERSION }}/*
SHA256SUMS
SHA512SUMS