Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ci

on:
pull_request:
push:
branches:
- master

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: stable

- name: Build
env:
CGO_ENABLED: '0'
run: GOOS=linux GOARCH=amd64 go build ./...

- name: Unit tests
run: go test ./api/...
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: stable

- name: Build linux binaries
env:
CGO_ENABLED: '0'
run: |
GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o goofys-amd64 .
GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -o goofys-arm64 .
cp goofys-amd64 goofys

- name: Create release and upload assets
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$GITHUB_REF_NAME" \
--title "$GITHUB_REF_NAME" \
--generate-notes \
goofys goofys-amd64 goofys-arm64
Loading