From 80f698942f4674248ad1f93c752203ba8f2368ab Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 5 Jan 2024 17:42:26 -0500 Subject: [PATCH] chore: sync release-please config with finch repo, pin actions (#108) Issue #, if available: Release please created "duplicate" PRs: https://github.com/runfinch/common-tests/pull/104 and https://github.com/runfinch/common-tests/pull/107. This is because of the update to major version 4. We saw similar issues in the main finch repo (see https://github.com/runfinch/finch/pull/746), so this is just porting over those changes. *Description of changes:* - Update release-please config - pin actions to SHAs *Testing done:* - [x] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Justin Alvarez --- .github/workflows/ci.yml | 6 +-- .github/workflows/lint-pr-title.yml | 2 +- .github/workflows/release-please.yml | 35 +--------------- .release-please-manifest.json | 3 ++ release-please-config.json | 60 ++++++++++++++++++++++++++++ 5 files changed, 68 insertions(+), 38 deletions(-) create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a57c44a..7ea3d15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,13 +10,13 @@ jobs: go-linter: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version-file: go.mod cache: true - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 with: # Pin the version in case all the builds start to fail at the same time. # There may not be an automatic way (e.g., dependabot) to update a specific parameter of a Github Action, diff --git a/.github/workflows/lint-pr-title.yml b/.github/workflows/lint-pr-title.yml index ecaf805..11fe68d 100644 --- a/.github/workflows/lint-pr-title.yml +++ b/.github/workflows/lint-pr-title.yml @@ -13,6 +13,6 @@ jobs: name: conventional-commit runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@v5 + - uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5.4.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 7088a18..36ae76e 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -7,37 +7,4 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: google-github-actions/release-please-action@v4 - with: - release-type: go - package-name: finch - # Include 'build' in the changelog and - # make it a releasable unit (patch version bump) because dependabot PRs uses it. - # For more details, see ../dependabot.yml. - # - # The mapping from type to section comes from conventional-commit-types [1] - # which is used by action-semantic-pull-request [2], - # which is used by us. - # - # [1] https://github.com/commitizen/conventional-commit-types/blob/master/index.json - # [2] https://github.com/amannn/action-semantic-pull-request/blob/0b14f54ac155d88e12522156e52cb6e397745cfd/README.md?plain=1#L60 - changelog-types: > - [ - { - "type":"feat", - "section":"Features", - "hidden":false - }, - { - "type":"fix", - "section":"Bug Fixes", - "hidden":false - }, - { - "type":"build", - "section":"Build System or External Dependencies", - "hidden":false - } - ] - # Before we are at v1.0.0 - bump-minor-pre-major: true + - uses: google-github-actions/release-please-action@cc61a07e2da466bebbc19b3a7dd01d6aecb20d1e # v4.0.2 diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..d7dcbaa --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.7.9" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..1155a64 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,60 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "go", + "bump-minor-pre-major": true, + "changelog-sections": [ + { + "type": "build", + "section": "Build System or External Dependencies", + "hidden": false + }, + { + "type": "exp", + "section": "Experimental", + "hidden": false + }, + { + "type": "feat", + "section": "Features", + "hidden": false + }, + { + "type": "fix", + "section": "Bug Fixes", + "hidden": false + }, + { + "type": "revert", + "section": "Reverts", + "hidden": false + }, + { + "type": "chore", + "section": "Miscellaneous Chores", + "hidden": true + }, + { + "type": "docs", + "section": "Documentation", + "hidden": true + }, + { + "type": "refactor", + "section": "Code Refactoring", + "hidden": true + }, + { + "type": "test", + "section": "Tests", + "hidden": true + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": true + } + ], + "packages": { + ".": {} + } +}