Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
xmdhs committed Oct 11, 2023
1 parent 47493b9 commit ed0bec3
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Go

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.21
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Build
run: |
bash build.sh
- name: Test
run: go test -race -v ./...

- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
# A file, directory or wildcard pattern that describes what to upload
path: cmd/authlibskin/out/*
name: ${{ github.run_number }}
9 changes: 9 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
cd frontend
npm install -g pnpm
pnpm install
pnpm build
cp -r dist ../server/static/files

cd ../cmd/authlibskin
go build -trimpath -ldflags "-w -s" -tags="redis,sqlite" -o out/authlibskin

0 comments on commit ed0bec3

Please sign in to comment.