Skip to content

feat: integration tests #10

feat: integration tests

feat: integration tests #10

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
env:
GO_VERSION: '1.22'
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Run tests
run: go test ./...
- name: Build for multiple platforms
run: |
# Create release directory
mkdir -p release
# Build for different platforms
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X main.version=${{ github.ref_name }}" -o release/faceit-cli-linux-amd64 main.go
GOOS=linux GOARCH=arm64 go build -ldflags="-s -w -X main.version=${{ github.ref_name }}" -o release/faceit-cli-linux-arm64 main.go
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w -X main.version=${{ github.ref_name }}" -o release/faceit-cli-windows-amd64.exe main.go
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X main.version=${{ github.ref_name }}" -o release/faceit-cli-darwin-amd64 main.go
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X main.version=${{ github.ref_name }}" -o release/faceit-cli-darwin-arm64 main.go
- name: Create checksums
run: |
cd release
sha256sum * > checksums.txt
- name: Create Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.RELEASE_TOKEN }}
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
body: |
## Downloads
Download the appropriate binary for your platform:
- **Linux (amd64)**: `faceit-cli-linux-amd64`
- **Linux (arm64)**: `faceit-cli-linux-arm64`
- **Windows (amd64)**: `faceit-cli-windows-amd64.exe`
- **macOS (amd64)**: `faceit-cli-darwin-amd64`
- **macOS (arm64)**: `faceit-cli-darwin-arm64`
## Verification
Verify your download with the checksums in `checksums.txt`.
files: |
release/*