Skip to content

fix: curtail long filenames in output [RANGER-1951] (#20) #18

fix: curtail long filenames in output [RANGER-1951] (#20)

fix: curtail long filenames in output [RANGER-1951] (#20) #18

name: Build and Release
on:
push:
branches:
- master
jobs:
build_and_release:
name: Build and Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Build all binaries
run: make build
- name: Calculate SHA256
run: |
sha256sum ./bin/recovery-tool-linux | cut -d' ' -f1 > ./bin/recovery-tool-linux.sha256
sha256sum ./bin/recovery-tool-mac | cut -d' ' -f1 > ./bin/recovery-tool-mac.sha256
sha256sum ./bin/recovery-tool.exe | cut -d' ' -f1 > ./bin/recovery-tool.exe.sha256
- name: Release
id: release
uses: dev-build-deploy/[email protected]
with:
token: ${{ github.token }}
prefix: v
versioning: semver
- name: Upload binary files to release
if: ${{ steps.release.outputs.created }}
run: |
gh release upload ${{ fromJSON(steps.release.outputs.release).tag_name }} ./bin/recovery-tool-linux
gh release upload ${{ fromJSON(steps.release.outputs.release).tag_name }} ./bin/recovery-tool-mac
gh release upload ${{ fromJSON(steps.release.outputs.release).tag_name }} ./bin/recovery-tool.exe
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
- name: Update GitHub Release with sha256sum
if: ${{ steps.release.outputs.created }}
run: |
gh release edit ${{ fromJSON(steps.release.outputs.release).tag_name }} \
--notes "$(gh release view ${{ fromJSON(steps.release.outputs.release).tag_name }} --json body -q '.body')
## Attached Binaries
recovery-tool-mac - macOS build (Apple Silicon)
sha256sum: $(cat ./bin/recovery-tool-mac.sha256)
recovery-tool-linux - Linux build (x86-64)
sha256sum: $(cat ./bin/recovery-tool-linux.sha256)
recovery-tool.exe - Windows build (x86-64)
sha256sum: $(cat ./bin/recovery-tool.exe.sha256)"
env:
GH_TOKEN: ${{ github.token }}