fix: ensure runtime bins are included in releases (#939) #72
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release UDS-CLI on Tag | |
permissions: | |
contents: read | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
test: | |
permissions: | |
packages: write | |
uses: ./.github/workflows/release-tests.yaml | |
push: | |
runs-on: ubuntu-latest | |
environment: release | |
needs: test | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 0 | |
- name: Free up disk space | |
run: rm -rf /opt/hostedtoolcache | |
- name: Setup golang | |
uses: ./.github/actions/golang | |
- name: Install tools | |
uses: ./.github/actions/install-tools | |
- name: Download build artifacts | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: build-artifacts | |
path: build/ | |
- name: Get Brew tap repo token | |
id: brew-tap-token | |
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 | |
with: | |
app-id: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_ID }} | |
private-key: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_SECRET }} | |
owner: defenseunicorns | |
repositories: homebrew-tap | |
- name: Download Runtime binaries for embedding | |
run: | | |
./hack/update-uds-runtime-binaries.sh uds-runtime-linux-amd64 | |
./hack/update-uds-runtime-binaries.sh uds-runtime-linux-arm64 | |
./hack/update-uds-runtime-binaries.sh uds-runtime-darwin-amd64 | |
./hack/update-uds-runtime-binaries.sh uds-runtime-darwin-arm64 | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6.0.0 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --clean --verbose --config .goreleaser.yaml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}} | |
HOMEBREW_TAP_GITHUB_TOKEN: ${{ steps.brew-tap-token.outputs.token }} |