forked from rancher-sandbox/rancher-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.44 KB
/
wsl-helper-build.yaml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This workflow builds the WSL Helper
name: 'GitHub Runner: WSL Helper'
on:
#push:
# paths: [ src/go/wsl-helper/** ]
#pull_request:
# paths: [ src/go/wsl-helper/** ]
workflow_dispatch:
permissions:
# This uses external actions, lock things down to read-only.
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: yarn
- uses: actions/setup-go@v5
with:
go-version-file: go.work
cache-dependency-path: src/go/wsl-helper/go.sum
- run: yarn install --frozen-lockfile
- name: Build Windows
run: go build .
working-directory: src/go/wsl-helper
env:
GOOS: windows
CGO_ENABLED: '0'
- name: Build Linux
run: go build .
working-directory: src/go/wsl-helper
env:
GOOS: linux
CGO_ENABLED: '0'
- uses: actions/upload-artifact@v4
with:
name: wsl-helper-linux
path: src/go/wsl-helper/wsl-helper
if-no-files-found: error
- uses: golangci/[email protected]
# This is only safe because this workflow does not allow writing
with:
args: --config=${{ github.workspace }}/.github/workflows/config/.golangci.yaml --verbose --timeout 3m
working-directory: src/go/wsl-helper
only-new-issues: true