Debian Codegraph @

.github/workflows/release.yml

raw
1 name: Release
2
3 on:
4 push:
5 tags:
6 - "*"
7
8 jobs:
9 build:
10 runs-on: ubuntu-latest
11 strategy:
12 matrix:
13 include:
14 - { os: android, arch: arm64 }
15 - { os: darwin, arch: amd64 }
16 - { os: darwin, arch: arm64 }
17 - { os: dragonfly, arch: amd64 }
18 - { os: freebsd, arch: "386" }
19 - { os: freebsd, arch: amd64 }
20 - { os: freebsd, arch: arm }
21 - { os: illumos, arch: amd64 }
22 - { os: linux, arch: "386" }
23 - { os: linux, arch: amd64 }
24 - { os: linux, arch: arm }
25 - { os: linux, arch: arm64 }
26 - { os: linux, arch: ppc64 }
27 - { os: linux, arch: ppc64le }
28 - { os: linux, arch: mips }
29 - { os: linux, arch: mipsle }
30 - { os: linux, arch: mips64 }
31 - { os: linux, arch: mips64le }
32 - { os: linux, arch: s390x }
33 - { os: netbsd, arch: "386" }
34 - { os: netbsd, arch: amd64 }
35 - { os: netbsd, arch: arm }
36 - { os: openbsd, arch: "386" }
37 - { os: openbsd, arch: amd64 }
38 - { os: openbsd, arch: arm }
39 - { os: openbsd, arch: arm64 }
40 - { os: solaris, arch: amd64 }
41 - { os: windows, arch: "386" }
42 - { os: windows, arch: amd64 }
43 # Unsupported
44 # - { os: aix, arch: ppc64 }
45 # - { os: android, arch: "386" }
46 # - { os: android, arch: amd64 }
47 # - { os: android, arch: arm }
48 # - { os: js, arch: wasm }
49 # - { os: plan9, arch: "386" }
50 # - { os: plan9, arch: amd64 }
51 # - { os: plan9, arch: arm }
52 steps:
53 - uses: actions/checkout@v7
54
55 - name: Setup Go
56 uses: actions/setup-go@v7
57 with:
58 go-version-file: go.mod
59
60 - name: Build
61 run: gen/build.sh
62 env:
63 GOOS: ${{ matrix.os }}
64 GOARCH: ${{ matrix.arch }}
65
66 - name: Package
67 run: gen/package.sh
68 env:
69 GOOS: ${{ matrix.os }}
70 GOARCH: ${{ matrix.arch }}
71
72 - name: Upload artifact
73 uses: actions/upload-artifact@v7
74 with:
75 name: lf-${{ matrix.os }}-${{ matrix.arch }}
76 path: dist/*
77
78 release:
79 runs-on: ubuntu-latest
80 needs: build
81 steps:
82 - name: Download artifacts
83 uses: actions/download-artifact@v8
84 with:
85 path: dist
86 merge-multiple: true
87
88 - name: Release
89 uses: softprops/action-gh-release@v3
90 with:
91 files: dist/*
92
93 winget:
94 runs-on: ubuntu-latest
95 needs: build
96 steps:
97 - uses: vedantmgoyal2009/winget-releaser@v2
98 with:
99 identifier: gokcehan.lf
100 version: ${{ github.ref_name }}
101 installers-regex: '-windows-\w+\.zip$'
102 token: ${{ secrets.WINGET_TOKEN }}