Skip to content

Commit 53c39c6

Browse files
author
Marc Jakobi
committed
ci: automated releases and luarocks uploads
1 parent 2412237 commit 53c39c6

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
name: "release"
1+
name: "Publish to luarocks"
22
on:
33
push:
44
tags: # Will upload to luarocks.org when a tag is pushed
55
- "*"
6+
release:
7+
types:
8+
- created
69
pull_request: # Will test a local install without uploading to luarocks.org
10+
workflow_dispatch: # Allow triggering manually on tags
711

812
jobs:
913
luarocks-release:
@@ -12,11 +16,16 @@ jobs:
1216
steps:
1317
- name: Checkout
1418
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0 # Required to count the commits
21+
- name: Get Version
22+
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
1523
- name: LuaRocks Upload
1624
uses: nvim-neorocks/luarocks-tag-release@v5
1725
env:
1826
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
1927
with:
28+
version: ${{ env.LUAROCKS_VERSION }}
2029
labels: |
2130
neovim
2231
nvim-cmp
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
permissions:
3+
contents: write
4+
pull-requests: write
5+
6+
name: Release Please
7+
8+
on:
9+
workflow_dispatch:
10+
push:
11+
branches:
12+
- main
13+
14+
jobs:
15+
release:
16+
name: release
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: google-github-actions/release-please-action@v4
20+
with:
21+
release-type: simple
22+
token: ${{ secrets.PAT }}

0 commit comments

Comments
 (0)