-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: Test goreleaser * Remove build flags * Added linux build * Added windows * Ready to roll --------- Co-authored-by: Vladimir Levin <[email protected]>
- Loading branch information
Showing
4 changed files
with
183 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,20 @@ | ||
name: "Build and push new LSP" | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [ created ] | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
push: | ||
tags: | ||
- v* | ||
jobs: | ||
releases-matrix: | ||
name: Release Go Binary | ||
release: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
goos: [ linux, windows, darwin ] | ||
goarch: [ "386", amd64, arm64 ] | ||
exclude: | ||
- goarch: "386" | ||
goos: darwin | ||
- goarch: arm64 | ||
goos: windows | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: wangyoucao577/go-release-action@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goversion: "1.22" | ||
goos: ${{ matrix.goos }} | ||
goarch: ${{ matrix.goarch }} | ||
binary_name: "pug-lsp" | ||
ldflags: "-s -w" | ||
|
||
- name: checkout code | ||
uses: actions/checkout@v4 | ||
- run: git fetch --prune --unshallow | ||
- name: setup dependencies | ||
uses: actions/setup-go@v2 | ||
- name: setup release environment | ||
run: |- | ||
echo 'GITHUB_TOKEN=${{ github.token }}' > .release-env | ||
- name: release publish | ||
run: make release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Build CI | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v4 | ||
- run: git fetch --prune --unshallow | ||
- name: setup dependencies | ||
uses: actions/setup-go@v2 | ||
- name: release dry run | ||
run: make release-dry-run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
project_name: pug-lsp | ||
env: | ||
- CO111MODULE=on | ||
- CGO_ENABLED=1 | ||
builds: | ||
- id: darwin-amd64 | ||
binary: pug-lsp | ||
main: ./main.go | ||
goarch: | ||
- amd64 | ||
goos: | ||
- darwin | ||
env: | ||
- CC=o64-clang | ||
- CXX=o64-clang++ | ||
flags: | ||
- "-mod=readonly" | ||
- -trimpath | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} | ||
- id: darwin-arm64 | ||
binary: pug-lsp | ||
main: ./main.go | ||
goarch: | ||
- arm64 | ||
goos: | ||
- darwin | ||
env: | ||
- CC=oa64-clang | ||
- CXX=oa64-clang++ | ||
flags: | ||
- "-mod=readonly" | ||
- -trimpath | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} | ||
- id: linux-amd64 | ||
binary: pug-lsp | ||
main: ./main.go | ||
goarch: | ||
- amd64 | ||
goos: | ||
- linux | ||
env: | ||
- CC=x86_64-linux-gnu-gcc | ||
- CXX=x86_64-linux-gnu-g++ | ||
flags: | ||
- "-mod=readonly" | ||
- -trimpath | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} | ||
- id: linux-arm64 | ||
binary: pug-lsp | ||
main: ./main.go | ||
goarch: | ||
- arm64 | ||
goos: | ||
- linux | ||
env: | ||
- CC=aarch64-linux-gnu-gcc | ||
- CXX=aarch64-linux-gnu-g++ | ||
flags: | ||
- "-mod=readonly" | ||
- -trimpath | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} | ||
- id: windows-amd64 | ||
binary: pug-lsp | ||
main: ./main.go | ||
goarch: | ||
- amd64 | ||
goos: | ||
- windows | ||
env: | ||
- CC=x86_64-w64-mingw32-gcc | ||
- CXX=x86_64-w64-mingw32-g++ | ||
flags: | ||
- "-mod=readonly" | ||
- -trimpath | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} | ||
universal_binaries: | ||
- id: darwin-universal | ||
ids: | ||
- darwin-amd64 | ||
- darwin-arm64 | ||
replace: true | ||
name_template: "pug-lsp" | ||
archives: | ||
- format: zip | ||
id: w/version | ||
builds: | ||
- darwin-universal | ||
- darwin-amd64 | ||
- darwin-arm64 | ||
- linux-amd64 | ||
- linux-arm64 | ||
- windows-amd64 | ||
name_template: "pug-lsp_{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||
wrap_in_directory: false | ||
- format: zip | ||
id: wo/version | ||
builds: | ||
- darwin-universal | ||
- darwin-amd64 | ||
- darwin-arm64 | ||
- linux-amd64 | ||
- linux-arm64 | ||
- windows-amd64 | ||
name_template: "pug-lsp_{{ .Os }}_{{ .Arch }}" | ||
wrap_in_directory: false | ||
checksum: | ||
name_template: "pug-lsp_{{ .Version }}_checksums.txt" | ||
|
||
release: | ||
mode: replace | ||
github: | ||
owner: opa-oz | ||
name: pug-lsp | ||
prerelease: auto | ||
draft: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters