ci: use release please for releasing (#45)

This commit is contained in:
uncenter 2024-05-24 10:33:55 -04:00 committed by GitHub
parent 9979443c24
commit ca2646a6b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 47 additions and 22 deletions

View File

@ -1,15 +1,27 @@
name: Release name: Release Please
on: on:
workflow_dispatch:
push: push:
tags: branches: [main]
- 'v*.*.*'
permissions:
contents: write
pull-requests: write
jobs: jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: needs: release-please
contents: write if: ${{ needs.release-please.outputs.release_created }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -44,11 +56,7 @@ jobs:
FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }} FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }}
FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }} FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }}
- name: Write changelog - name: Upload artifacts
run: pnpm dlx changelogithub@latest --output CHANGELOG.md env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release run: gh release upload ${{ needs.release-please.outputs.tag_name }} dist/*.zip
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG.md
files: dist/*.zip

View File

@ -0,0 +1,3 @@
{
".": "0.6.0"
}

View File

@ -1,9 +0,0 @@
{
"types": {
"feat": { "title": "🚀 Enhancements" },
"perf": { "title": "🔥 Performance" },
"fix": { "title": "🩹 Fixes" },
"refactor": { "title": "💅 Refactors" },
"docs": { "title": "📖 Documentation" }
}
}

View File

@ -0,0 +1,23 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"last-release-sha": "9979443c24c2f4f4110494c4ac3976853fdf6168",
"packages": {
".": {
"package-name": "",
"release-type": "node"
}
},
"changelog-sections": [
{ "type": "feat", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
{ "type": "perf", "section": "Performance Improvements" },
{ "type": "revert", "section": "Reverts", "hidden": true },
{ "type": "docs", "section": "Documentation", "hidden": true },
{ "type": "style", "section": "Styles", "hidden": true },
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": true },
{ "type": "refactor", "section": "Code Refactoring", "hidden": true },
{ "type": "test", "section": "Tests", "hidden": true },
{ "type": "build", "section": "Build System", "hidden": true },
{ "type": "ci", "section": "Continuous Integration", "hidden": true }
]
}