Skip to content

Add actual writer

Add actual writer #400

Workflow file for this run

name: Go
on: push
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: windows
goarch: amd64
- goos: windows
goarch: arm64
- goos: darwin
goarch: arm64
- goos: darwin
goarch: amd64
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: linux
goarch: arm
goarm: 7
- goos: linux
goarch: arm
goarm: 6
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.24
- name: Build
id: build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }}
run: |
OS_ARCH="${{ matrix.goos }}-${{ matrix.goarch }}"
if [ -n "${{ matrix.goarm }}" ]; then
OS_ARCH="${OS_ARCH}-v${{ matrix.goarm }}"
fi
BINARY_NAME="ynabber-${OS_ARCH}"
go build -o "$BINARY_NAME" ./cmd/ynabber/
echo "binary=$BINARY_NAME" >> $GITHUB_OUTPUT
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build.outputs.binary }}
path: ${{ steps.build.outputs.binary }}
retention-days: 7
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.23, 1.24]
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Test
run: go test -v ./...
release:
runs-on: ubuntu-latest
needs: [build, test]
if: github.ref_type == 'tag'
steps:
- uses: actions/checkout@v2
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts/
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: artifacts/*/ynabber-*