chore(release): v2.1.0 (#626) #12
Workflow file for this run
This file contains hidden or 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
| --- | |
| # This workflow notifies the HashiCorp integration-api that a release has occurred. | |
| name: Notify Integration Release (Tag) | |
| on: | |
| push: | |
| tags: | |
| - '*.*.*' # Proper releases | |
| jobs: | |
| strip-version: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| packer-version: ${{ steps.strip.outputs.packer-version }} | |
| steps: | |
| - name: Strip leading v from version tag | |
| id: strip | |
| env: | |
| REF: ${{ github.ref_name }} | |
| run: | | |
| echo "packer-version=$(echo "$REF" | sed -E 's/v?([0-9]+\.[0-9]+\.[0-9]+)/\1/')" >> "$GITHUB_OUTPUT" | |
| notify-release: | |
| needs: | |
| - strip-version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| ref: ${{ github.ref }} | |
| # Ensure the documentation is up-to-date. | |
| - uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0 | |
| with: | |
| go-version-file: 'go.mod' | |
| - shell: bash | |
| run: make generate | |
| - shell: bash | |
| run: | | |
| uncommitted="$(git status -s)" | |
| if [[ -z "$uncommitted" ]]; then | |
| echo "OK" | |
| else | |
| echo "Docs have been updated, but the compiled docs have not been committed." | |
| echo "Run 'make generate', and commit the result to resolve this error." | |
| echo "Generated but uncommitted files:" | |
| echo "$uncommitted" | |
| exit 1 | |
| fi | |
| # Perform the release. | |
| - name: Checkout Repository (Integration Release Action) | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| repository: hashicorp/integration-release-action | |
| path: ./integration-release-action | |
| - name: Notify Release | |
| uses: ./integration-release-action | |
| with: | |
| integration_identifier: "packer/vmware/vsphere" | |
| release_version: ${{ needs.strip-version.outputs.packer-version }} | |
| release_sha: ${{ github.ref }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |