2022-11-02 20:22:34 +01:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
2022-11-03 18:55:22 +01:00
|
|
|
- 'v*.*.*'
|
2022-11-02 20:22:34 +01:00
|
|
|
|
2023-02-08 17:40:27 +01:00
|
|
|
# grant write permission to GITHUB_TOKEN for goreleaser
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
2023-10-31 21:42:00 +01:00
|
|
|
env:
|
|
|
|
ZITI_DEB_PROD_REPO: ${{ vars.ZITI_DEB_PROD_REPO || 'zitipax-openziti-deb-stable' }}
|
|
|
|
ZITI_RPM_PROD_REPO: ${{ vars.ZITI_RPM_PROD_REPO || 'zitipax-openziti-rpm-stable' }}
|
|
|
|
JFROG_CLI_VERSION: ${{ vars.JFROG_CLI_VERSION || '2.50.4' }}
|
|
|
|
|
2022-11-02 20:22:34 +01:00
|
|
|
jobs:
|
2023-02-08 17:40:27 +01:00
|
|
|
build-linux-amd64:
|
2023-01-24 17:38:58 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2022-11-02 20:22:34 +01:00
|
|
|
steps:
|
2023-06-06 00:00:16 +02:00
|
|
|
- run: sudo apt update
|
2022-11-02 21:51:44 +01:00
|
|
|
- run: sudo apt-get install gcc-multilib g++-multilib
|
2022-11-02 21:58:33 +01:00
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-02 21:00:21 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- run: git fetch --force --tags
|
2022-11-02 20:22:34 +01:00
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/setup-go@v5
|
2022-11-02 20:22:34 +01:00
|
|
|
with:
|
2024-06-26 21:32:58 +02:00
|
|
|
go-version-file: ./go.mod
|
2022-11-02 21:00:21 +01:00
|
|
|
cache: true
|
2022-11-02 20:22:34 +01:00
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/setup-node@v4
|
2022-11-02 20:22:34 +01:00
|
|
|
with:
|
2023-08-11 17:19:22 +02:00
|
|
|
node-version: 18.x
|
2022-11-02 20:22:34 +01:00
|
|
|
|
|
|
|
- run: npm install
|
|
|
|
working-directory: ui
|
|
|
|
|
|
|
|
- run: npm run build
|
|
|
|
working-directory: ui
|
|
|
|
env:
|
2023-06-28 19:41:16 +02:00
|
|
|
CI: "true"
|
2022-11-02 20:22:34 +01:00
|
|
|
|
2024-06-27 17:36:27 +02:00
|
|
|
- uses: goreleaser/goreleaser-action@v6
|
2022-11-02 20:22:34 +01:00
|
|
|
with:
|
2022-11-02 21:00:21 +01:00
|
|
|
distribution: goreleaser
|
2024-06-27 17:36:27 +02:00
|
|
|
version: '~> v2'
|
2024-07-24 22:41:13 +02:00
|
|
|
args: release --skip=publish --config .goreleaser-linux-amd64.yml
|
2022-11-02 20:22:34 +01:00
|
|
|
env:
|
2022-11-02 21:00:21 +01:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-11-03 18:55:22 +01:00
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
2022-11-03 18:55:22 +01:00
|
|
|
with:
|
2024-06-26 21:32:58 +02:00
|
|
|
name: release-builds-linux-amd64
|
2022-11-03 21:51:22 +01:00
|
|
|
path: ./dist/*.gz
|
|
|
|
|
2023-10-31 21:42:00 +01:00
|
|
|
- name: Configure jFrog CLI
|
2024-06-26 21:32:58 +02:00
|
|
|
uses: jfrog/setup-jfrog-cli@v4
|
2023-10-31 21:42:00 +01:00
|
|
|
with:
|
|
|
|
version: ${{ env.JFROG_CLI_VERSION }}
|
|
|
|
env:
|
|
|
|
JF_ENV_1: ${{ secrets.ZITI_ARTIFACTORY_CLI_CONFIG_PACKAGE_UPLOAD }}
|
|
|
|
|
|
|
|
- name: Upload RPM to Artifactory release repo
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
for RPM in ./dist/*.rpm; do
|
|
|
|
echo "INFO: Uploading $RPM"
|
|
|
|
jf rt upload --recursive=false --flat=true \
|
|
|
|
"$RPM" \
|
|
|
|
${{ env.ZITI_RPM_PROD_REPO }}/redhat/x86_64/
|
|
|
|
done
|
|
|
|
|
|
|
|
- name: Upload DEB to Artifactory release repo
|
|
|
|
shell: bash
|
2023-11-01 22:20:21 +01:00
|
|
|
run: |
|
2023-10-31 21:42:00 +01:00
|
|
|
for DEB in ./dist/*.deb; do
|
|
|
|
echo "INFO: Uploading $DEB"
|
|
|
|
jf rt upload --recursive=false --flat=true \
|
|
|
|
--deb=debian/main/amd64 \
|
|
|
|
"$DEB" \
|
|
|
|
${{ env.ZITI_DEB_PROD_REPO }}/pool/zrok/amd64/
|
|
|
|
done
|
|
|
|
|
2023-02-08 17:40:27 +01:00
|
|
|
build-linux-arm64:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
2023-06-06 00:00:16 +02:00
|
|
|
- run: sudo apt update
|
2023-02-08 17:40:27 +01:00
|
|
|
- run: sudo apt-get install gcc-aarch64-linux-gnu
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-02-08 17:40:27 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- run: git fetch --force --tags
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/setup-go@v5
|
2023-02-08 17:40:27 +01:00
|
|
|
with:
|
2024-06-26 21:32:58 +02:00
|
|
|
go-version-file: ./go.mod
|
2023-02-08 17:40:27 +01:00
|
|
|
cache: true
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/setup-node@v4
|
2023-02-08 17:40:27 +01:00
|
|
|
with:
|
2023-10-11 17:40:42 +02:00
|
|
|
node-version: 18.x
|
2023-02-08 17:40:27 +01:00
|
|
|
|
|
|
|
- run: npm install
|
|
|
|
working-directory: ui
|
|
|
|
|
|
|
|
- run: npm run build
|
|
|
|
working-directory: ui
|
|
|
|
env:
|
2023-06-28 19:41:16 +02:00
|
|
|
CI: "true"
|
2023-02-08 17:40:27 +01:00
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: goreleaser/goreleaser-action@v6
|
2023-02-08 17:40:27 +01:00
|
|
|
with:
|
|
|
|
distribution: goreleaser
|
2024-06-27 17:36:27 +02:00
|
|
|
version: '~> v2'
|
2023-10-11 17:40:42 +02:00
|
|
|
args: release --skip=publish --config .goreleaser-linux-arm64.yml
|
2023-02-08 17:40:27 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-02-08 17:40:27 +01:00
|
|
|
with:
|
2024-06-26 21:32:58 +02:00
|
|
|
name: release-builds-linux-arm64
|
2023-02-08 17:40:27 +01:00
|
|
|
path: ./dist/*.gz
|
|
|
|
|
2023-10-31 21:42:00 +01:00
|
|
|
- name: Configure jFrog CLI
|
2024-06-26 21:32:58 +02:00
|
|
|
uses: jfrog/setup-jfrog-cli@v4
|
2023-10-31 21:42:00 +01:00
|
|
|
with:
|
|
|
|
version: ${{ env.JFROG_CLI_VERSION }}
|
|
|
|
env:
|
|
|
|
JF_ENV_1: ${{ secrets.ZITI_ARTIFACTORY_CLI_CONFIG_PACKAGE_UPLOAD }}
|
|
|
|
|
|
|
|
- name: Upload RPM to Artifactory release repo
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
for RPM in ./dist/*.rpm; do
|
|
|
|
echo "INFO: Uploading $RPM"
|
|
|
|
jf rt upload --recursive=false --flat=true \
|
|
|
|
"$RPM" \
|
|
|
|
${{ env.ZITI_RPM_PROD_REPO }}/redhat/aarch64/
|
|
|
|
done
|
|
|
|
|
|
|
|
- name: Upload DEB to Artifactory release repo
|
|
|
|
shell: bash
|
2023-11-01 22:20:21 +01:00
|
|
|
run: |
|
2023-10-31 21:42:00 +01:00
|
|
|
for DEB in ./dist/*.deb; do
|
|
|
|
echo "INFO: Uploading $DEB"
|
|
|
|
jf rt upload --recursive=false --flat=true \
|
|
|
|
--deb=debian/main/arm64 \
|
|
|
|
"$DEB" \
|
|
|
|
${{ env.ZITI_DEB_PROD_REPO }}/pool/zrok/arm64/
|
|
|
|
done
|
|
|
|
|
2023-01-30 17:42:22 +01:00
|
|
|
build-linux-arm:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
2023-06-06 00:00:16 +02:00
|
|
|
- run: sudo apt update
|
2024-07-25 19:27:31 +02:00
|
|
|
- run: sudo apt-get install gcc-arm-linux-gnueabihf
|
2023-01-30 17:42:22 +01:00
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-01-30 17:42:22 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- run: git fetch --force --tags
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/setup-go@v5
|
2023-01-30 17:42:22 +01:00
|
|
|
with:
|
2024-06-26 21:32:58 +02:00
|
|
|
go-version-file: ./go.mod
|
2023-01-30 17:42:22 +01:00
|
|
|
cache: true
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/setup-node@v4
|
2023-01-30 17:42:22 +01:00
|
|
|
with:
|
2023-10-11 17:40:42 +02:00
|
|
|
node-version: 18.x
|
2023-01-30 17:42:22 +01:00
|
|
|
|
|
|
|
- run: npm install
|
|
|
|
working-directory: ui
|
|
|
|
|
|
|
|
- run: npm run build
|
|
|
|
working-directory: ui
|
|
|
|
env:
|
2023-06-28 19:41:16 +02:00
|
|
|
CI: "true"
|
2023-01-30 17:42:22 +01:00
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: goreleaser/goreleaser-action@v6
|
2023-01-30 17:42:22 +01:00
|
|
|
with:
|
|
|
|
distribution: goreleaser
|
2024-06-27 17:36:27 +02:00
|
|
|
version: '~> v2'
|
2023-10-11 17:40:42 +02:00
|
|
|
args: release --skip=publish --config .goreleaser-linux-armhf.yml
|
2023-01-30 17:42:22 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-01-30 17:42:22 +01:00
|
|
|
with:
|
2024-06-26 21:32:58 +02:00
|
|
|
name: release-builds-linux-arm
|
2023-01-30 17:42:22 +01:00
|
|
|
path: ./dist/*.gz
|
|
|
|
|
2023-10-31 21:42:00 +01:00
|
|
|
- name: Configure jFrog CLI
|
2024-06-26 21:32:58 +02:00
|
|
|
uses: jfrog/setup-jfrog-cli@v4
|
2023-10-31 21:42:00 +01:00
|
|
|
with:
|
|
|
|
version: ${{ env.JFROG_CLI_VERSION }}
|
|
|
|
env:
|
|
|
|
JF_ENV_1: ${{ secrets.ZITI_ARTIFACTORY_CLI_CONFIG_PACKAGE_UPLOAD }}
|
|
|
|
|
|
|
|
- name: Upload RPM to Artifactory release repo
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
for RPM in ./dist/*.rpm; do
|
|
|
|
echo "INFO: Uploading $RPM"
|
|
|
|
jf rt upload --recursive=false --flat=true \
|
|
|
|
"$RPM" \
|
|
|
|
${{ env.ZITI_RPM_PROD_REPO }}/redhat/armv7/
|
|
|
|
done
|
|
|
|
|
|
|
|
- name: Upload DEB to Artifactory release repo
|
|
|
|
shell: bash
|
2023-11-01 22:20:21 +01:00
|
|
|
run: |
|
2023-10-31 21:42:00 +01:00
|
|
|
for DEB in ./dist/*.deb; do
|
|
|
|
echo "INFO: Uploading $DEB"
|
|
|
|
jf rt upload --recursive=false --flat=true \
|
|
|
|
--deb=debian/main/armv7 \
|
|
|
|
"$DEB" \
|
|
|
|
${{ env.ZITI_DEB_PROD_REPO }}/pool/zrok/armv7/
|
|
|
|
done
|
|
|
|
|
2022-11-03 21:51:22 +01:00
|
|
|
build-darwin:
|
2023-10-31 21:42:00 +01:00
|
|
|
if: github.repository_owner == 'openziti' || vars.ZROK_SKIP_MACOS_BUILD == 'false'
|
2022-11-03 21:51:22 +01:00
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
2022-11-08 17:08:17 +01:00
|
|
|
- name: import distribution cert
|
2024-07-24 22:41:13 +02:00
|
|
|
uses: apple-actions/import-codesign-certs@v3
|
2022-11-08 17:08:17 +01:00
|
|
|
with:
|
|
|
|
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
|
|
|
|
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-03 21:51:22 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- run: git fetch --force --tags
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/setup-go@v5
|
2022-11-03 21:51:22 +01:00
|
|
|
with:
|
2024-06-26 21:32:58 +02:00
|
|
|
go-version-file: ./go.mod
|
2022-11-03 21:51:22 +01:00
|
|
|
cache: true
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/setup-node@v4
|
2022-11-03 21:51:22 +01:00
|
|
|
with:
|
2023-10-11 17:40:42 +02:00
|
|
|
node-version: 18.x
|
2022-11-03 21:51:22 +01:00
|
|
|
|
|
|
|
- run: npm install
|
|
|
|
working-directory: ui
|
|
|
|
|
|
|
|
- run: npm run build
|
|
|
|
working-directory: ui
|
|
|
|
env:
|
2023-06-28 19:41:16 +02:00
|
|
|
CI: "true"
|
2022-11-03 21:51:22 +01:00
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: goreleaser/goreleaser-action@v6
|
2022-11-03 21:51:22 +01:00
|
|
|
with:
|
|
|
|
distribution: goreleaser
|
2024-06-27 17:36:27 +02:00
|
|
|
version: '~> v2'
|
2023-10-11 17:40:42 +02:00
|
|
|
args: release --skip=publish --config .goreleaser-darwin.yml
|
2022-11-03 21:51:22 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-11-08 17:08:17 +01:00
|
|
|
AC_USERNAME: ${{ secrets.AC_USERNAME }}
|
|
|
|
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
|
2022-11-03 21:51:22 +01:00
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
2022-11-03 21:51:22 +01:00
|
|
|
with:
|
2024-06-26 21:32:58 +02:00
|
|
|
name: release-builds-darwin
|
2022-11-03 21:51:22 +01:00
|
|
|
path: ./dist/*.gz
|
2022-11-03 18:55:22 +01:00
|
|
|
|
|
|
|
build-windows:
|
2023-10-31 21:42:00 +01:00
|
|
|
if: github.repository_owner == 'openziti' || vars.ZROK_SKIP_WINDOWS_BUILD == 'false'
|
2022-11-03 18:55:22 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-06-06 00:00:16 +02:00
|
|
|
- run: sudo apt update
|
2022-11-03 18:55:22 +01:00
|
|
|
- run: sudo apt-get install gcc-mingw-w64-x86-64
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-03 18:55:22 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- run: git fetch --force --tags
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/setup-go@v5
|
2022-11-03 18:55:22 +01:00
|
|
|
with:
|
2024-06-26 21:32:58 +02:00
|
|
|
go-version-file: ./go.mod
|
2022-11-03 18:55:22 +01:00
|
|
|
cache: true
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/setup-node@v4
|
2022-11-03 18:55:22 +01:00
|
|
|
with:
|
2023-10-11 17:40:42 +02:00
|
|
|
node-version: 18.x
|
2022-11-03 18:55:22 +01:00
|
|
|
|
|
|
|
- run: npm install
|
|
|
|
working-directory: ui
|
|
|
|
|
|
|
|
- run: npm run build
|
|
|
|
working-directory: ui
|
|
|
|
env:
|
2023-06-28 19:41:16 +02:00
|
|
|
CI: "true"
|
2022-11-03 18:55:22 +01:00
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: goreleaser/goreleaser-action@v6
|
2022-11-03 18:55:22 +01:00
|
|
|
with:
|
|
|
|
distribution: goreleaser
|
2024-06-27 17:36:27 +02:00
|
|
|
version: '~> v2'
|
2023-10-11 17:40:42 +02:00
|
|
|
args: release --skip=publish --config .goreleaser-windows.yml
|
2022-11-03 18:55:22 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
2022-11-03 18:55:22 +01:00
|
|
|
with:
|
2024-06-26 21:32:58 +02:00
|
|
|
name: release-builds-windows
|
2022-11-03 21:51:22 +01:00
|
|
|
path: ./dist/*.gz
|
2022-11-03 18:55:22 +01:00
|
|
|
|
|
|
|
publish-release:
|
2023-11-01 20:43:52 +01:00
|
|
|
# allow skipped but not failed
|
|
|
|
if: ${{
|
|
|
|
!cancelled()
|
2024-06-26 21:32:58 +02:00
|
|
|
&& (needs.build-linux-amd64.result == 'success')
|
|
|
|
&& (needs.build-linux-arm.result == 'success')
|
|
|
|
&& (needs.build-linux-arm64.result == 'success')
|
2023-11-01 20:43:52 +01:00
|
|
|
&& (needs.build-darwin.result == 'success' || needs.build-darwin.result == 'skipped')
|
|
|
|
&& (needs.build-windows.result == 'success' || needs.build-windows.result == 'skipped')
|
|
|
|
}}
|
2024-06-26 21:32:58 +02:00
|
|
|
needs:
|
|
|
|
- build-linux-amd64
|
|
|
|
- build-linux-arm
|
|
|
|
- build-linux-arm64
|
|
|
|
- build-darwin
|
|
|
|
- build-windows
|
2022-11-03 18:55:22 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-03 18:55:22 +01:00
|
|
|
|
|
|
|
- run: |
|
2022-11-03 21:51:22 +01:00
|
|
|
mkdir -p ./automated-release-build
|
2022-11-03 18:55:22 +01:00
|
|
|
|
2024-06-26 21:32:58 +02:00
|
|
|
- uses: actions/download-artifact@v4
|
2022-11-03 18:55:22 +01:00
|
|
|
with:
|
2022-11-03 21:51:22 +01:00
|
|
|
path: ./automated-release-build
|
2024-06-26 21:32:58 +02:00
|
|
|
merge-multiple: true
|
|
|
|
pattern: release-builds-*
|
2022-11-03 18:55:22 +01:00
|
|
|
|
|
|
|
- run: |
|
2024-06-26 22:13:40 +02:00
|
|
|
ls -lAR ./automated-release-build/
|
2022-11-03 21:51:22 +01:00
|
|
|
shasum ./automated-release-build/* > ./automated-release-build/checksums.txt
|
2022-11-03 18:55:22 +01:00
|
|
|
|
2024-06-26 22:51:29 +02:00
|
|
|
- uses: goreleaser/goreleaser-action@v6
|
2022-11-03 18:55:22 +01:00
|
|
|
with:
|
2024-06-27 17:36:27 +02:00
|
|
|
distribution: goreleaser
|
|
|
|
version: '~> v2'
|
2022-11-03 18:55:22 +01:00
|
|
|
args: release --config .goreleaser-release.yml
|
|
|
|
env:
|
2023-02-08 17:40:27 +01:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|