Skip to content

Commit

Permalink
ci: release-please
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Sep 20, 2024
1 parent ae31e1b commit 4927b59
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 14 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/release.yml → .github/workflows/luarocks.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
---
name: "Release"
name: "Push to LuaRocks"
on:
pull_request:
workflow_dispatch:
push:
tags:
- "*"
release:
types:
- created
pull_request:

jobs:
release:
runs-on: ubuntu-latest
name: Release
name: LuaRocks upload
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fail if changelog entry does not exist
if: startsWith(github.ref, 'refs/tags/')
run: grep -q "${{ github.ref_name }}" CHANGELOG.md
with:
fetch-depth: 0 # Required to count the commits

- name: Get Version
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV

- name: Install Lua
uses: leso-kn/gh-actions-lua@master
Expand All @@ -40,6 +44,7 @@ jobs:
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
version: ${{ env.LUAROCKS_VERSION }}
dependencies: |
neotest
tree-sitter-haskell
Expand All @@ -48,9 +53,3 @@ jobs:
* Supports Stack projects.
* Parses Sydtest, Hspec and Tasty filters for the cursor's position using TreeSitter.
* Parses test results and displays error messages as virtual text.
- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
bodyFile: "CHANGELOG.md"
allowUpdates: true
4 changes: 4 additions & 0 deletions .github/workflows/release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"bootstrap-sha": "ae31e1b2f468487212ad47c6bbed7e3b281c1faa"
}

23 changes: 23 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
permissions:
contents: write
pull-requests: write

name: Release Please

on:
workflow_dispatch:
push:
branches:
- master

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
release-type: simple
token: ${{ secrets.PAT }}
config-file: .github/workflows/release-please-config.json
1 change: 0 additions & 1 deletion .github/workflows/review-checklist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,5 @@ jobs:
- [ ] Tests have been added.
- [ ] Tested manually (Steps to reproduce in PR description).
- [ ] Updated documentation.
- [ ] Updated [CHANGELOG.md](https://github.com/mrcjkb/neotest-haskell/blob/master/CHANGELOG.md)
`,
})

0 comments on commit 4927b59

Please sign in to comment.