ci: release-please

This commit is contained in:
Lewis Russell 2024-04-17 14:29:07 +01:00
parent 36181d6484
commit f0447b734e
5 changed files with 52 additions and 6 deletions

View file

@ -3,16 +3,49 @@ on:
branches:
- main
name: release-please
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release
update-doc:
needs: release-please
if: ${{ ! needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
release-type: simple
ref: release-please--branches--test-rp
# Fetch the last 2 commits instead of just 1. (Fetching just 1 commit would overwrite the whole history)
fetch-depth: 2
- uses: leafo/gh-actions-lua@v9
with:
luaVersion: "5.1.5"
- uses: leafo/gh-actions-luarocks@v4
- name: Update doc
run: make gen_help
- name: Update PR
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
git diff
git add doc
git commit --amend --no-edit
git push --force

View file

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

View file

@ -2,7 +2,7 @@
*gitsigns.nvim*
Author: Lewis Russell <lewis6991@gmail.com>
Version: 0.7-dev
Version: v0.7.0
Homepage: <https://github.com/lewis6991/gitsigns.nvim>
License: MIT license

View file

@ -478,7 +478,7 @@ end
--- @return string|fun():string
local function get_marker_text(marker)
return ({
VERSION = '0.7-dev',
VERSION = 'v0.7.0', -- x-release-please-version
CONFIG = gen_config_doc,
FUNCTIONS = function()
return gen_functions_doc({

View file

@ -1,3 +1,13 @@
{
"include-component-in-tag": false
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "simple",
"include-component-in-tag": false,
"bump-minor-pre-major": true,
"packages": {
".": {
"extra-files": [
"gen_help.lua"
]
}
}
}