Skip to content

Commit

Permalink
ci: Set up dev and tag luarocks release workflow (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristijanhusak authored Aug 22, 2024
1 parent 4616941 commit 5f25f6d
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 58 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/luarocks.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
name: Push to Luarocks

on:
push:
tags:
- '*'
release:
types:
- created
pull_request: # Runs test install without uploading
workflow_dispatch: # Allows to trigger manually
workflow_call:
inputs:
luarocks_version:
type: string
required: true

jobs:
luarocks-upload:
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to count the commits
- name: Get Version
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
fetch-depth: 0
- name: Install C/C++ Compiler
uses: rlalik/setup-cpp-compiler@master
with:
Expand All @@ -41,6 +36,6 @@ jobs:
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
version: ${{ env.LUAROCKS_VERSION }}
version: ${{ inputs.luarocks_version }}
dependencies: |
tree-sitter-orgmode ~> 1
39 changes: 0 additions & 39 deletions .github/workflows/luarocks_dev.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Push release to Luarocks

on:
push:
tags:
- '*'
release:
types:
- created
workflow_dispatch:

jobs:
tests:
uses: ./.github/workflows/tests.yml
version:
needs: tests
runs-on: ubuntu-latest
outputs:
luarocks_version: ${{ steps.get_version.outputs.LUAROCKS_VERSION }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to count the commits
- name: Get Version
id: get_version
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_OUTPUT
luarocks:
needs: version
uses: ./.github/workflows/luarocks.yml
with:
luarocks_version: ${{ needs.version.outputs.luarocks_version }}
16 changes: 16 additions & 0 deletions .github/workflows/release_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: dev

on:
push:
branches:
- master
pull_request: # Luarocks upload only tests installation

jobs:
tests:
uses: ./.github/workflows/tests.yml
luarocks_dev:
needs: tests
uses: ./.github/workflows/luarocks.yml
with:
luarocks_version: dev
7 changes: 1 addition & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: tests

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_call:

env:
CI: true
Expand Down

0 comments on commit 5f25f6d

Please sign in to comment.