Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Set up dev and tag luarocks release workflow #801

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading