Files
crypto/.github/workflows/release.yml
T
Hanzo AI f1db74c283 ci: update actions to Node 24, fix golangci-lint v2 config
Update checkout@v5, setup-go@v6, cache@v5, codecov@v5. Pin
golangci-lint to v2.1.6 with version: "2" config. Fix release
workflow Go version to 1.26.1.
2025-12-27 12:07:55 -08:00

83 lines
1.9 KiB
YAML

name: Release
on:
push:
tags:
- 'v*.*.*'
- 'crypto/v*.*.*'
permissions:
contents: write
jobs:
test:
name: Test Before Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26.1'
- name: Install dependencies
run: |
go mod download
make install-tools
- name: Run tests
run: make test
- name: Run linter
run: make lint
release:
name: Create Release
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.26.1'
- name: Build binaries
run: |
# Build for multiple platforms
GOOS=linux GOARCH=amd64 go build -o dist/crypto-linux-amd64 ./...
GOOS=linux GOARCH=arm64 go build -o dist/crypto-linux-arm64 ./...
GOOS=darwin GOARCH=amd64 go build -o dist/crypto-darwin-amd64 ./...
GOOS=darwin GOARCH=arm64 go build -o dist/crypto-darwin-arm64 ./...
GOOS=windows GOARCH=amd64 go build -o dist/crypto-windows-amd64.exe ./...
- name: Generate changelog
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/changelog-config.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.changelog.outputs.changelog }}
files: |
dist/*
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Go Module Index
run: |
curl -X POST https://proxy.golang.org/github.com/luxfi/crypto/@v/${{ github.ref_name }}.info