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 f0447b7
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 6 deletions.
39 changes: 36 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 f0447b7

Please sign in to comment.