chore: add release-please automation (#5842)
This commit is contained in:
parent
5be530dbac
commit
f394e9469a
5 changed files with 81 additions and 1 deletions
3
.github/workflows/build-canary-image.yml
vendored
3
.github/workflows/build-canary-image.yml
vendored
|
|
@ -8,6 +8,9 @@ concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.repository }}
|
group: ${{ github.workflow }}-${{ github.repository }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-frontend:
|
build-frontend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
37
.github/workflows/release-please.yml
vendored
Normal file
37
.github/workflows/release-please.yml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
name: Release Please
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-please:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check release token
|
||||||
|
env:
|
||||||
|
RELEASE_PLEASE_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$RELEASE_PLEASE_TOKEN" ]; then
|
||||||
|
echo "RELEASE_PLEASE_TOKEN must be set to a fine-grained PAT so release-please tags can trigger release.yml." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Run release-please
|
||||||
|
uses: googleapis/release-please-action@v4
|
||||||
|
with:
|
||||||
|
# Use a fine-grained PAT so generated tags trigger release.yml.
|
||||||
|
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
||||||
|
config-file: release-please-config.json
|
||||||
|
manifest-file: .release-please-manifest.json
|
||||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
|
@ -10,6 +10,9 @@ concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VERSION: "1.26.1"
|
GO_VERSION: "1.26.1"
|
||||||
NODE_VERSION: "24"
|
NODE_VERSION: "24"
|
||||||
|
|
@ -243,7 +246,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ needs.prepare.outputs.tag }}
|
tag_name: ${{ needs.prepare.outputs.tag }}
|
||||||
name: ${{ needs.prepare.outputs.tag }}
|
name: ${{ needs.prepare.outputs.tag }}
|
||||||
generate_release_notes: true
|
|
||||||
prerelease: ${{ needs.prepare.outputs.is_prerelease == 'true' }}
|
prerelease: ${{ needs.prepare.outputs.is_prerelease == 'true' }}
|
||||||
files: artifacts/*
|
files: artifacts/*
|
||||||
|
|
||||||
|
|
|
||||||
3
.release-please-manifest.json
Normal file
3
.release-please-manifest.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
".": "0.26.2"
|
||||||
|
}
|
||||||
35
release-please-config.json
Normal file
35
release-please-config.json
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
|
||||||
|
"include-v-in-tag": true,
|
||||||
|
"include-component-in-tag": false,
|
||||||
|
"bump-minor-pre-major": true,
|
||||||
|
"packages": {
|
||||||
|
".": {
|
||||||
|
"release-type": "go",
|
||||||
|
"package-name": "memos",
|
||||||
|
"changelog-path": "CHANGELOG.md",
|
||||||
|
"changelog-sections": [
|
||||||
|
{
|
||||||
|
"type": "feat",
|
||||||
|
"section": "Features"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "fix",
|
||||||
|
"section": "Bug Fixes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "perf",
|
||||||
|
"section": "Performance Improvements"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "deps",
|
||||||
|
"section": "Dependencies"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "revert",
|
||||||
|
"section": "Reverts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue