release/v4.0.0 #323
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: Check PR | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- run: git tag $(cat VERSION) | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19 | |
- name: Setup `packer` | |
uses: hashicorp/setup-packer@main | |
id: setup | |
with: | |
version: 1.11.0-alpha2 | |
- name: Describe plugin | |
id: plugin_describe | |
run: echo "::set-output name=api_version::$(go run . describe | jq -r '.api_version')" | |
- name: Install packer-pdc | |
run: go get github.com/hashicorp/packer-plugin-sdk/cmd/packer-sdc@latest | |
- name: Run GoReleaser build | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: latest | |
args: build --single-target --snapshot --clean | |
env: | |
PACKER_CI_PROJECT_API_VERSION: ${{ steps.plugin_describe.outputs.api_version }} |