Skip to content

cleanup: remove pid file from git and ignore it #212

cleanup: remove pid file from git and ignore it

cleanup: remove pid file from git and ignore it #212

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin, freebsd]
goarch: [amd64, arm64]
exclude:
- goos: windows
goarch: arm64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Build binary
run: |
mkdir -p dist
EXT=""
if [ "${{ matrix.goos }}" = "windows" ]; then
EXT=".exe"
fi
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -o dist/tinyice-${{ matrix.goos }}-${{ matrix.goarch }}${EXT} main.go
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: tinyice-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/*
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Generate Checksums
run: |
cd artifacts
# Generate checksums for all binaries in subdirectories
sha256sum tinyice-*/* | sed 's|tinyice-[^/]*/||' > ../checksums.txt
cd ..
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
artifacts/**/tinyice*
checksums.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}