Skip to content

Commit

Permalink
ci: release-please
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis6991 committed Apr 17, 2024
1 parent 36181d6 commit 5f84cd8
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 7 deletions.
40 changes: 36 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,50 @@
on:
push:
branches:
- main
- test-rp

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
with:
release-type: simple
target-branch: test-rp

update-doc:
needs: release-please
if: ${{ ! needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: release-please--branches--test-rp

- 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 pull
git add doc
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 commit --amend --no-edit
git push
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.7.0"
}
2 changes: 1 addition & 1 deletion doc/gitsigns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion gen_help.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
12 changes: 11 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
}

0 comments on commit 5f84cd8

Please sign in to comment.