mirror of
https://github.com/openziti/zrok.git
synced 2025-03-31 09:36:05 +02: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
|
- uses: action/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: zrok-linux
|
name: release-builds
|
||||||
path: dist/zrok*
|
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:
|
build-windows:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -85,35 +124,26 @@ jobs:
|
|||||||
|
|
||||||
- uses: action/upload-artifact@v3
|
- uses: action/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: zrok-windows
|
name: release-builds
|
||||||
path: dist/zrok*
|
path: ./dist/*.gz
|
||||||
|
|
||||||
publish-release:
|
publish-release:
|
||||||
needs: [build-linux, build-windows]
|
needs: [build-linux, build-darwin, build-windows]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
mkdir -p ./zrok-build/linux
|
mkdir -p ./automated-release-build
|
||||||
mkdir -p ./zrok-build/windows
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: zrok-linux
|
path: ./automated-release-build
|
||||||
path: ./zrok-build/linux
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: zrok-windows
|
|
||||||
path: ./zrok-build/windows
|
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
cd ./zrok-build
|
mv ./automated-release-build/release-builds/* ./automated-release-build/
|
||||||
cat ./linux/zrok*checksums.txt >> checksums.txt
|
rm -rf ./automated-release-build/release-builds
|
||||||
cat ./windows/zrok*checksums.txt >> checksums.txt
|
shasum ./automated-release-build/* > ./automated-release-build/checksums.txt
|
||||||
rm ./linux/zrok*checksums.txt
|
|
||||||
rm ./windows/zrok*checksums.txt
|
|
||||||
|
|
||||||
- uses: goreleaser/goreleaser-action@v3
|
- uses: goreleaser/goreleaser-action@v3
|
||||||
with:
|
with:
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
.$*
|
.$*
|
||||||
.idea
|
.idea
|
||||||
*.db
|
*.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:
|
builds:
|
||||||
- main: ./cmd/zrok
|
- 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}}"
|
ldflags: "-s -w -X github.com/openziti-test-kitchen/zrok/build.Version={{.Tag}} -X github.com/openziti-test-kitchen/zrok/build.Hash={{.ShortCommit}}"
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=1
|
- CGO_ENABLED=1
|
||||||
|
@ -4,5 +4,4 @@ release:
|
|||||||
draft: true
|
draft: true
|
||||||
mode: append
|
mode: append
|
||||||
extra_files:
|
extra_files:
|
||||||
- glob: ./zrok-build/**/*
|
- glob: ./automated-release-build/*
|
||||||
- glob: ./zrok-build/checksums.txt
|
|
@ -1,5 +1,6 @@
|
|||||||
builds:
|
builds:
|
||||||
- main: ./cmd/zrok
|
- 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}}"
|
ldflags: "-s -w -X github.com/openziti-test-kitchen/zrok/build.Version={{.Tag}} -X github.com/openziti-test-kitchen/zrok/build.Hash={{.ShortCommit}}"
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=1
|
- CGO_ENABLED=1
|
||||||
|
Loading…
Reference in New Issue
Block a user