ci(release): move release please config files to correct path #451
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: CI | |
on: [push] | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: read | |
checks: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.59 | |
env: | |
VERBOSE: "true" | |
lint-provider: | |
name: Lint Provider | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- name: Run tfproviderlint | |
run: make lint-provider | |
tidy: | |
name: Tidy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- name: Check if mods are tidy | |
run: make check-tidy | |
test: | |
name: Acceptance Test (VCR Replay) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
terraform_version: | |
- "" # latest | |
- "1.8.5" | |
- "1.7.5" | |
- "1.6.6" | |
- "1.5.7" | |
- "1.4.7" | |
- "1.3.10" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ matrix.terraform_version }} | |
terraform_wrapper: false | |
- name: Run tests | |
run: make testacc | |
env: | |
VERBOSE: "true" | |
VCR: "replay" | |
KATAPULT_API_KEY: ${{ secrets.KATAPULT_API_KEY }} | |
KATAPULT_ORGANIZATION: ${{ secrets.KATAPULT_ORGANIZATION }} | |
KATAPULT_DATA_CENTER: ${{ secrets.KATAPULT_DATA_CENTER }} | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- name: Validate documentation | |
run: make check-docs | |
- name: Ensure generated documentation is up to date | |
run: mv docs docs-current && make docs && diff -rN docs-current docs | |
release-please: | |
name: Release Please | |
runs-on: ubuntu-latest | |
needs: [lint, lint-provider, tidy, test, docs] | |
if: github.ref == 'refs/heads/main' | |
outputs: | |
release_created: ${{ steps.release-please.outputs.release_created }} | |
tag_name: ${{ steps.release-please.outputs.tag_name }} | |
version: ${{ steps.release-please.outputs.version }} | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: krystal/release-please-manifest-action@v1 | |
id: release-please | |
with: | |
app-id: ${{ vars.RELEASE_PLEASE_GITHUB_APP_ID }} | |
private-key: ${{ secrets.RELEASE_PLEASE_GITHUB_APP_PRIVATE_KEY }} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: [release-please] | |
if: needs.release-please.outputs.release_created | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- name: Import GPG key | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: "${{ secrets.GPG_PRIVATE_KEY }}" | |
passphrase: "${{ secrets.PASSPHRASE }}" | |
- name: goreleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: "~> v2" | |
args: release --clean | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
GPG_FINGERPRINT: "${{ steps.import_gpg.outputs.fingerprint }}" |