Skip to content

homebrew: add product label to PR #333

homebrew: add product label to PR

homebrew: add product label to PR #333

Workflow file for this run

name: PR_build
on:
# Runs when a pull request is created against main branch
pull_request:
branches:
- main
env:
PKG_NAME: "enos"
jobs:
build-artifact:
name: Build Linux Artifact
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux]
goarch: [amd64]
fail-fast: true
outputs:
artifact-name: ${{ steps.build.outputs.artifact-name }}
env:
GOPRIVATE: 'github.com/hashicorp/*'
TOKEN: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CI: true
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
- name: Get Product Version
id: get-product-version
run: |
make version
echo "product-version=$(make version)" >> "$GITHUB_OUTPUT"
- uses: ./.github/actions/build
id: build
with:
goarch: ${{ matrix.goarch }}
goos: ${{ matrix.goos }}
version: ${{ steps.get-product-version.outputs.product-version }}
- name: Upload
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: ${{ env.PKG_NAME }}_${{ steps.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
path: out/${{ env.PKG_NAME }}_${{ steps.get-product-version.outputs.product-version }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip
retention-days: 1
validate-artifact:
name: Validate Artifact
needs: build-artifact
# Use local path to call reusable workflow validate.yml.
uses: ./.github/workflows/validate.yml
with:
artifact-name: ${{ needs.build-artifact.outputs.artifact-name }}
secrets: inherit