Skip to content

Commit

Permalink
chore(deps): update google-github-actions/release-please-action actio…
Browse files Browse the repository at this point in the history
…n to v4 (#49)

* chore(deps): update google-github-actions/release-please-action action to v4

* add permissions in workflow

* update config

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tobias Diez <code@tobiasdiez.de>
  • Loading branch information
renovate[bot] and tobiasdiez committed Mar 21, 2024
1 parent 0a0c0fa commit 0b26309
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@ on:
branches:
- main
name: release
permissions:
contents: write
pull-requests: write
jobs:
release-pr:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node
token: ${{ secrets.RELEASE_PR_TOKEN }}
changelog-types: |-
[
{ "type": "feat", "section": "🔖 Features", "hidden": false },
{ "type": "fix", "section": "🐛 Bug Fixes", "hidden": false },
{ "type": "chore", "section": "🧹 Miscellaneous", "hidden": false }
]

# Format changelog, workaround for https://github.com/google-github-actions/release-please-action/issues/542
# Taken from https://github.com/remarkablemark/release-please-extra-files-demo/blob/master/.github/workflows/release-please.yml
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.pr }}
with:
token: ${{ secrets.RELEASE_PR_TOKEN }}
fetch-depth: 0
ref: ${{ fromJson(steps.release.outputs.pr).headBranchName }}

- name: Configure Git user
Expand All @@ -39,12 +38,17 @@ jobs:
if: ${{ steps.release.outputs.pr }}
run: npx prettier --write CHANGELOG.md

- name: Commit and push
- name: Commit
if: ${{ steps.release.outputs.pr }}
run: |
git add CHANGELOG.md
git commit -m 'chore: Format CHANGELOG.md with Prettier' --no-verify
git push
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.RELEASE_PR_TOKEN }}
branch: ${{ fromJson(steps.release.outputs.pr).headBranchName }}

publish_npm:
name: Publish to npm
Expand Down
11 changes: 11 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
"packages": {
".": {}
},
"changelog-sections": [
{ "type": "feat", "section": "🔖 Features", "hidden": false },
{ "type": "fix", "section": "🐛 Bug Fixes", "hidden": false },
{ "type": "chore", "section": "🧹 Miscellaneous", "hidden": false }
]
}

0 comments on commit 0b26309

Please sign in to comment.