diff --git a/.github/workflows/release.yaml b/.github/workflows/luarocks.yaml similarity index 62% rename from .github/workflows/release.yaml rename to .github/workflows/luarocks.yaml index 66c7ed546..5ab8d1234 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/luarocks.yaml @@ -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: @@ -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 + uses: nvim-neorocks/luarocks-tag-release@v7 env: LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} with: + version: ${{ env.LUAROCKS_VERSION }} labels: | neovim nvim-cmp diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml new file mode 100644 index 000000000..84321dbbe --- /dev/null +++ b/.github/workflows/release-please.yaml @@ -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 }}