Skip to content

chore: add binary releases #1

chore: add binary releases

chore: add binary releases #1

Workflow file for this run

name: build
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
env:
DESTDIR: ./bin
GO_VERSION: 1.23.1
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
run: |
make build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: credential
path: credential-*
if-no-files-found: error
windows_build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Build
run: |
make build-windows
- name: Upload Windows Artifact
uses: actions/upload-artifact@v4
with:
name: credential-windows
path: credential-*.exe
if-no-files-found: error
create_release:
runs-on: ubuntu-latest
needs: [ build, windows_build ]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- run: sleep 10
- name: Download all artifacts
uses: actions/download-artifact@v4
- run: ls -lR
- run: |
sha256sum -b credential*/* > checksums.txt
sha256sum -c --strict checksums.txt
- name: Create Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: "./credential/*,./credential-windows/*,./checksums.txt"
makeLatest: ${{ !contains(github.ref_name, '-rc') }}
generateReleaseNotes: true
prerelease: ${{ contains(github.ref_name, '-rc') }}
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}