Skip to content

Checksum builder Linux #53

Checksum builder Linux

Checksum builder Linux #53

name: Checksum builder Linux
on:
workflow_dispatch:
push:
# branches:
# - main
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT || github.token }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
check-latest: true
- name: compile
run: go build checksum.go
- name: Test
run: |
touch file
echo 1 >> file
./checksum -s sha256 -f file
./checksum -s sha256 -f checksum > checksum.sha256
tar -czf checksum-linux.tar.gz checksum checksum.sha256
./checksum -s sha256 -f checksum.tar.gz > checksum-linux.tar.gz.sha256
- name: Upload to checksum binary to github
uses: actions/upload-artifact@v3
with:
name: checksum
path: |
checksum-linux.tar.gz
checksum-linux.tar.gz.sha256
- name: Upload Release Asset
id: upload-linux-binary
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
with:
files: |
checksum.tar.gz
checksum.tar.gz.sha256