Skip to content

Commit

Permalink
ci: automated releases and luarocks uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed May 13, 2024
1 parent 2412237 commit 53c39c6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: "release"
name: "Publish to luarocks"
on:
push:
tags: # Will upload to luarocks.org when a tag is pushed
- "*"
release:
types:
- created
pull_request: # Will test a local install without uploading to luarocks.org
workflow_dispatch: # Allow triggering manually on tags

jobs:
luarocks-release:
Expand All @@ -12,11 +16,16 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to count the commits
- name: Get Version
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v5
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
version: ${{ env.LUAROCKS_VERSION }}
labels: |
neovim
nvim-cmp
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
permissions:
contents: write
pull-requests: write

name: Release Please

on:
workflow_dispatch:
push:
branches:
- main

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
release-type: simple
token: ${{ secrets.PAT }}

0 comments on commit 53c39c6

Please sign in to comment.