mirror of
https://github.com/openziti/zrok.git
synced 2025-06-20 09:48:07 +02:00
cross-platform goreleaser; wip (#70)
This commit is contained in:
parent
33199b0e93
commit
c4ba54f60d
85
.github/workflows/release.yml
vendored
85
.github/workflows/release.yml
vendored
@ -3,10 +3,10 @@ name: Release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- 'v*.*.*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release-build:
|
build-linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: sudo apt-get install gcc-multilib g++-multilib
|
- run: sudo apt-get install gcc-multilib g++-multilib
|
||||||
@ -38,6 +38,85 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: latest
|
version: latest
|
||||||
args: release --rm-dist
|
args: release --skip-publish --config .goreleaser-linux.yml
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: action/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: zrok-linux
|
||||||
|
path: dist/zrok*
|
||||||
|
|
||||||
|
build-windows:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- run: sudo apt-get install gcc-mingw-w64-x86-64
|
||||||
|
|
||||||
|
- 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-windows.yml
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: action/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: zrok-windows
|
||||||
|
path: dist/zrok*
|
||||||
|
|
||||||
|
publish-release:
|
||||||
|
needs: [build-linux, build-windows]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
mkdir -p ./zrok-build/linux
|
||||||
|
mkdir -p ./zrok-build/windows
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- uses: goreleaser/goreleaser-action@v3
|
||||||
|
with:
|
||||||
|
args: release --config .goreleaser-release.yml
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@ -1,9 +1,9 @@
|
|||||||
builds:
|
builds:
|
||||||
- main: ./cmd/zrok
|
- main: ./cmd/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}}"
|
||||||
ignore:
|
|
||||||
- goarch: arm
|
|
||||||
- goarch: arm64
|
|
||||||
- goos: darwin
|
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=1
|
- CGO_ENABLED=1
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- amd64
|
8
.goreleaser-release.yml
Normal file
8
.goreleaser-release.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
builds:
|
||||||
|
- skip: true
|
||||||
|
release:
|
||||||
|
draft: true
|
||||||
|
mode: append
|
||||||
|
extra_files:
|
||||||
|
- glob: ./zrok-build/**/*
|
||||||
|
- glob: ./zrok-build/checksums.txt
|
10
.goreleaser-windows.yml
Normal file
10
.goreleaser-windows.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
builds:
|
||||||
|
- main: ./cmd/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
|
||||||
|
- CC=/usr/bin/x86_64-w64-mingw32-gcc
|
||||||
|
goos:
|
||||||
|
- windows
|
||||||
|
goarch:
|
||||||
|
- amd64
|
Loading…
x
Reference in New Issue
Block a user