Skip to content

Prepare v0.67.1 release #92

Prepare v0.67.1 release

Prepare v0.67.1 release #92

Workflow file for this run

name: Post Tag
on:
push:
tags:
- "*"
jobs:
generate:
name: Generate Code
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
token: ${{ secrets.GH_PUSH_TOKEN }}
- name: Generate
run: make clean generate
release-build:
name: Release Build (linux, windows)
runs-on: ubuntu-22.04
needs: generate
steps:
- name: Check out code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build Linux and Windows
run: make ci-go-ci-build-linux ci-go-ci-build-linux-static ci-go-ci-build-windows
timeout-minutes: 30
env:
TELEMETRY_URL: ${{ secrets.TELEMETRY_URL }}
- name: Build Linux arm64
run: make ci-go-ci-build-linux-static
timeout-minutes: 30
env:
GOARCH: arm64
TELEMETRY_URL: ${{ secrets.TELEMETRY_URL }}
- name: Upload binaries
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
if: always()
with:
name: binaries-linux-windows
path: _release
release-build-darwin:
name: Release Build (darwin)
runs-on: macos-14
needs: generate
steps:
- name: Check out code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- id: go_version
name: Read go version
run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT
- name: Install Go (${{ steps.go_version.outputs.go_version }})
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ steps.go_version.outputs.go_version }}
- name: Build Darwin
run: |
make ci-build-darwin GOARCH=amd64
make ci-build-darwin-arm64-static
timeout-minutes: 30
env:
TELEMETRY_URL: ${{ secrets.TELEMETRY_URL }}
- name: Upload binaries (darwin)
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
if: always()
with:
name: binaries-darwin
path: _release
build:
name: Push Latest Release
needs: [release-build, release-build-darwin]
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set TAG_NAME in Environment
# Subsequent jobs will be have the computed tag name
run: echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Download release binaries
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: binaries-*
merge-multiple: true
path: _release
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@aa33708b10e362ff993539393ff100fa93ed6a27 # v3.5.0
- name: Build and Deploy OPA Docker Images
id: build-and-deploy
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_IMAGE: ${{ secrets.DOCKER_IMAGE }}
# Only run if required secrets are provided
if: ${{ env.DOCKER_USER && env.DOCKER_PASSWORD }}
run: make release-ci
- name: Create or Update Release
env:
# Required for the GitHub CLI
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./build/github-release.sh --asset-dir=$(make release-dir) --tag=${TAG_NAME}