mirror of
https://github.com/openziti/zrok.git
synced 2024-11-24 17:13:51 +01:00
fully cross-platform build? (#70)
This commit is contained in:
parent
c4ba54f60d
commit
81571950d5
68
.github/workflows/release.yml
vendored
68
.github/workflows/release.yml
vendored
@ -44,8 +44,47 @@ jobs:
|
||||
|
||||
- uses: action/upload-artifact@v3
|
||||
with:
|
||||
name: zrok-linux
|
||||
path: dist/zrok*
|
||||
name: release-builds
|
||||
path: ./dist/*.gz
|
||||
|
||||
build-darwin:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- run: git fetch --force --tags
|
||||
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '>=1.19.3'
|
||||
cache: true
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
|
||||
- run: npm install
|
||||
working-directory: ui
|
||||
|
||||
- run: npm run build
|
||||
working-directory: ui
|
||||
env:
|
||||
CI: ""
|
||||
|
||||
- uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --skip-publish --config .goreleaser-darwin.yml
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: action/upload-artifact@v3
|
||||
with:
|
||||
name: release-builds
|
||||
path: ./dist/*.gz
|
||||
|
||||
build-windows:
|
||||
runs-on: ubuntu-latest
|
||||
@ -85,35 +124,26 @@ jobs:
|
||||
|
||||
- uses: action/upload-artifact@v3
|
||||
with:
|
||||
name: zrok-windows
|
||||
path: dist/zrok*
|
||||
name: release-builds
|
||||
path: ./dist/*.gz
|
||||
|
||||
publish-release:
|
||||
needs: [build-linux, build-windows]
|
||||
needs: [build-linux, build-darwin, build-windows]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- run: |
|
||||
mkdir -p ./zrok-build/linux
|
||||
mkdir -p ./zrok-build/windows
|
||||
mkdir -p ./automated-release-build
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: zrok-linux
|
||||
path: ./zrok-build/linux
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: zrok-windows
|
||||
path: ./zrok-build/windows
|
||||
path: ./automated-release-build
|
||||
|
||||
- run: |
|
||||
cd ./zrok-build
|
||||
cat ./linux/zrok*checksums.txt >> checksums.txt
|
||||
cat ./windows/zrok*checksums.txt >> checksums.txt
|
||||
rm ./linux/zrok*checksums.txt
|
||||
rm ./windows/zrok*checksums.txt
|
||||
mv ./automated-release-build/release-builds/* ./automated-release-build/
|
||||
rm -rf ./automated-release-build/release-builds
|
||||
shasum ./automated-release-build/* > ./automated-release-build/checksums.txt
|
||||
|
||||
- uses: goreleaser/goreleaser-action@v3
|
||||
with:
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
.$*
|
||||
.idea
|
||||
*.db
|
||||
automated-release-build
|
||||
|
10
.goreleaser-darwin.yml
Normal file
10
.goreleaser-darwin.yml
Normal file
@ -0,0 +1,10 @@
|
||||
builds:
|
||||
- main: ./cmd/zrok
|
||||
binary: zrok
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
goos:
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
@ -1,5 +1,6 @@
|
||||
builds:
|
||||
- main: ./cmd/zrok
|
||||
binary: zrok
|
||||
ldflags: "-s -w -X github.com/openziti-test-kitchen/zrok/build.Version={{.Tag}} -X github.com/openziti-test-kitchen/zrok/build.Hash={{.ShortCommit}}"
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
|
@ -4,5 +4,4 @@ release:
|
||||
draft: true
|
||||
mode: append
|
||||
extra_files:
|
||||
- glob: ./zrok-build/**/*
|
||||
- glob: ./zrok-build/checksums.txt
|
||||
- glob: ./automated-release-build/*
|
@ -1,5 +1,6 @@
|
||||
builds:
|
||||
- main: ./cmd/zrok
|
||||
binary: zrok
|
||||
ldflags: "-s -w -X github.com/openziti-test-kitchen/zrok/build.Version={{.Tag}} -X github.com/openziti-test-kitchen/zrok/build.Hash={{.ShortCommit}}"
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
|
Loading…
Reference in New Issue
Block a user