Skip to content

fix: algorithm not being used in CLI (#2) #4

fix: algorithm not being used in CLI (#2)

fix: algorithm not being used in CLI (#2) #4

Workflow file for this run

name: Create Release
on:
push:
tags:
- "v1.*.*"
permissions: write-all
jobs:
release:
name: Create release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.release.outputs.upload_url }}
steps:
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
id: release
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
build:
name: Build and upload artifacts
runs-on: ubuntu-latest
needs: release
strategy:
matrix:
os: [ "linux", "darwin" ]
arch: [ "amd64", "arm64" ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build ${{ matrix.os }}_${{ matrix.arch }}
run: go build -ldflags="-X 'main.Version=${{ github.ref }}'" -o bin/hashgo_${{ matrix.os }}_${{ matrix.arch }} main.go
env:
CGO_ENABLED: 0
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
- name: Upload artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_name: hashgo_${{ matrix.os }}_${{ matrix.arch }}
asset_path: bin/hashgo_${{ matrix.os }}_${{ matrix.arch }}
asset_content_type: 'application/octet-stream'