fix: updates actions location (#33) #4
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 Maru on Tag | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repo and setup the tooling for this job | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Setup golang | |
uses: ./.github/actions/golang | |
- name: Build CLI | |
run: | | |
make build-cli-linux-amd | |
# Upload the contents of the build directory for later stages to use | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: build-artifacts | |
path: build/ | |
retention-days: 1 | |
validate: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
needs: build | |
steps: | |
# Checkout the repo and setup the tooling for this job | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Download build artifacts | |
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | |
with: | |
name: build-artifacts | |
path: build/ | |
- name: Install Zarf | |
uses: ./.github/actions/zarf | |
- name: Setup golang | |
uses: ./.github/actions/golang | |
- name: Make maru executable | |
run: | | |
chmod +x build/maru | |
- name: Run e2e tests | |
run: | | |
make test-e2e | |
- name: Save logs | |
if: always() | |
uses: ./.github/actions/save-logs | |
push: | |
runs-on: ubuntu-latest | |
environment: release | |
needs: validate | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Setup golang | |
uses: ./.github/actions/golang | |
- name: Install tools | |
uses: ./.github/actions/install-tools | |
- name: Download build artifacts | |
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4 | |
with: | |
name: build-artifacts | |
path: build/ | |
- name: Get Brew tap repo token | |
id: brew-tap-token | |
uses: peter-murray/workflow-application-token-action@dc0413987a085fa17d19df9e47d4677cf81ffef3 # v3.0.0 | |
with: | |
application_id: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_ID }} | |
application_private_key: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_SECRET }} | |
organization: defenseunicorns | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --rm-dist --debug | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}} | |
HOMEBREW_TAP_GITHUB_TOKEN: ${{ steps.brew-tap-token.outputs.token }} |