From 64873f0b278c562325d3c37ca79f39c7ebd5ec7d Mon Sep 17 00:00:00 2001 From: matiyas Date: Fri, 27 Feb 2026 08:51:24 +0100 Subject: [PATCH] ci: auto-create GitHub releases with LuaRocks sync --- .github/workflows/release.yml | 43 ++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b436642..3ca431f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,9 +8,50 @@ on: jobs: release: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v4 - - uses: nvim-neorocks/luarocks-tag-release@v7 + with: + fetch-depth: 0 + + - name: Generate changelog + id: changelog + run: | + # Get previous tag + PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "") + if [ -z "$PREV_TAG" ]; then + COMMITS=$(git log --pretty=format:"- %s" HEAD) + else + COMMITS=$(git log --pretty=format:"- %s" ${PREV_TAG}..HEAD) + fi + echo "commits<> $GITHUB_OUTPUT + echo "$COMMITS" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + + - name: Create GitHub release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: false + body: | + ## Changes + + ${{ steps.changelog.outputs.commits }} + + ## Install + + Using [lazy.nvim](https://github.com/folke/lazy.nvim): + ```lua + { "matiyas/vue-sfc-format.nvim" } + ``` + + Using [LuaRocks](https://luarocks.org/modules/matiyas/vue-sfc-format.nvim): + ``` + luarocks install vue-sfc-format.nvim + ``` + + - name: Publish to LuaRocks + uses: nvim-neorocks/luarocks-tag-release@v7 env: LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} with: