Skip to content

Commit

Permalink
ci: Update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kristijanhusak committed Feb 1, 2025
1 parent 1df68f7 commit 4825f15
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,39 @@
# on:
# workflow_dispatch:
# inputs:
# version:
# type: string
# description: 'Version'
# required: true
on:
push:
branches:
- master
- feat/changelog

permissions:
contents: write
pull-requests: write

name: release-please
name: release

jobs:
release-please:
tag:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
release-type: simple
ref: master
fetch-depth: 0
- name: Install Neovim
uses: rhysd/action-setup-vim@v1
id: neovim
with:
neovim: true
version: v0.10.3
- name: Update changelog
run: |
nvim -l scripts/generate_changelog.lua 0.4.2
# nvim -l scripts/generate_changelog.lua ${{ github.event.inputs.version }}
- name: Print changelog
run: |
cat docs/changelog.org
2 changes: 2 additions & 0 deletions scripts/generate_changelog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ local function populate_section(content, name, list)
end
local function generate_changelog()
local latest_tag = vim.fn.system('git describe --tags `git rev-list --tags --max-count=1`'):gsub('\n', '')
print('latest tag', latest_tag)
local commits = vim.fn.systemlist('git log ' .. latest_tag .. "..master --pretty=format:'%s'")
print(commits, vim.inspect(commits))
local fixes = {}
local features = {}
local breaking_changes = {}
Expand Down

0 comments on commit 4825f15

Please sign in to comment.