forked from WiiLink24/wfc-server
-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (35 loc) · 948 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Build CI
on:
push:
branches: ["main"]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Install dependencies
run: go mod download
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: build --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete unused files
run: |
cd dist
rm -rf *.json *.json *.yaml *.tar.gz
- name: Get short SHA
id: short-sha
run: echo "SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: wfc-server-${{ steps.short-sha.outputs.SHA }}
path: ./dist/*/*