stop using old node actions; build with Go distribution version from go.mod

This commit is contained in:
Kenneth Bingham 2024-06-26 15:32:58 -04:00
parent c5530c4d0c
commit b50cbe8939
No known key found for this signature in database
GPG Key ID: 31709281860130B6
5 changed files with 61 additions and 54 deletions

View File

@ -20,7 +20,7 @@ jobs:
runs-on: ${{ matrix.spec.runner }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
@ -39,7 +39,7 @@ jobs:
run: |
python setup.py sdist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: startsWith(matrix.spec.name, 'linux')
with:
name: zrok_sdk

View File

@ -19,15 +19,15 @@ jobs:
name: Build Linux AMD64 CLI
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: setup-go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: '>=1.21.3'
go-version-file: ./go.mod
- name: setup-node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
@ -72,7 +72,7 @@ jobs:
echo go_bin="$(go env GOPATH)/bin" >> $GITHUB_OUTPUT
- name: upload build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: linux-amd64
path: ${{ steps.solve_go_bin.outputs.go_bin }}/zrok
@ -92,7 +92,7 @@ jobs:
echo branch_tag=$(sed 's/[^a-z0-9_-]/__/gi' <<< "${GITHUB_REF#refs/heads/}") >> $GITHUB_OUTPUT
- name: Checkout Workspace
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download Branch Build Artifact
uses: actions/download-artifact@v3

View File

@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
name: setup npm
with:
node-version: 18

View File

@ -27,7 +27,7 @@ jobs:
echo "zrok_semver=${zrok_semver#v}" | tee -a $GITHUB_OUTPUT
- name: Checkout Workspace
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create the Release Arch Dirs
run: |

View File

@ -21,18 +21,18 @@ jobs:
- run: sudo apt update
- run: sudo apt-get install gcc-multilib g++-multilib
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: '>=1.21.3'
go-version-file: ./go.mod
cache: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x
@ -52,13 +52,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: release-builds
name: release-builds-linux-amd64
path: ./dist/*.gz
- name: Configure jFrog CLI
uses: jfrog/setup-jfrog-cli@v3
uses: jfrog/setup-jfrog-cli@v4
with:
version: ${{ env.JFROG_CLI_VERSION }}
env:
@ -91,18 +91,18 @@ jobs:
- run: sudo apt update
- run: sudo apt-get install gcc-aarch64-linux-gnu
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: '>=1.21.3'
go-version-file: ./go.mod
cache: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x
@ -114,7 +114,7 @@ jobs:
env:
CI: "true"
- uses: goreleaser/goreleaser-action@v2
- uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
@ -122,13 +122,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: release-builds
name: release-builds-linux-arm64
path: ./dist/*.gz
- name: Configure jFrog CLI
uses: jfrog/setup-jfrog-cli@v3
uses: jfrog/setup-jfrog-cli@v4
with:
version: ${{ env.JFROG_CLI_VERSION }}
env:
@ -161,18 +161,18 @@ jobs:
- run: sudo apt update
- run: sudo apt-get install gcc-arm-linux-gnueabi
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: '>=1.21.3'
go-version-file: ./go.mod
cache: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x
@ -184,7 +184,7 @@ jobs:
env:
CI: "true"
- uses: goreleaser/goreleaser-action@v2
- uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
@ -192,13 +192,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: release-builds
name: release-builds-linux-arm
path: ./dist/*.gz
- name: Configure jFrog CLI
uses: jfrog/setup-jfrog-cli@v3
uses: jfrog/setup-jfrog-cli@v4
with:
version: ${{ env.JFROG_CLI_VERSION }}
env:
@ -235,18 +235,18 @@ jobs:
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: '>=1.21.3'
go-version-file: ./go.mod
cache: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x
@ -258,7 +258,7 @@ jobs:
env:
CI: "true"
- uses: goreleaser/goreleaser-action@v2
- uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
@ -268,9 +268,9 @@ jobs:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: release-builds
name: release-builds-darwin
path: ./dist/*.gz
build-windows:
@ -280,18 +280,18 @@ jobs:
- run: sudo apt update
- run: sudo apt-get install gcc-mingw-w64-x86-64
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: '>=1.21.3'
go-version-file: ./go.mod
cache: true
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18.x
@ -303,7 +303,7 @@ jobs:
env:
CI: "true"
- uses: goreleaser/goreleaser-action@v2
- uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
@ -311,32 +311,39 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: release-builds
name: release-builds-windows
path: ./dist/*.gz
publish-release:
# allow skipped but not failed
if: ${{
!cancelled()
&& (needs.build-linux-amd64.result == 'success' || needs.build-linux-amd64.result == 'skipped')
&& (needs.build-linux-arm.result == 'success' || needs.build-linux-amd.result == 'skipped')
&& (needs.build-linux-arm64.result == 'success' || needs.build-linux-amd64.result == 'skipped')
&& (needs.build-linux-amd64.result == 'success')
&& (needs.build-linux-arm.result == 'success')
&& (needs.build-linux-arm64.result == 'success')
&& (needs.build-darwin.result == 'success' || needs.build-darwin.result == 'skipped')
&& (needs.build-windows.result == 'success' || needs.build-windows.result == 'skipped')
}}
needs: [build-linux-amd64, build-linux-arm, build-linux-arm64, build-darwin, build-windows]
needs:
- build-linux-amd64
- build-linux-arm
- build-linux-arm64
- build-darwin
- build-windows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
mkdir -p ./automated-release-build
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: ./automated-release-build
merge-multiple: true
pattern: release-builds-*
- run: |
mv ./automated-release-build/release-builds/* ./automated-release-build/