Skip to content

Commit d23ea9f

Browse files
committed
update release workflow
1 parent fa4a5b3 commit d23ea9f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/luarocks.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,15 @@ jobs:
1717
- uses: actions/checkout@v3
1818
with:
1919
fetch-depth: 0 # Required to count the commits
20-
- name: Get Version
20+
- name: Get scm Version
21+
if: github.event_name == 'push'
22+
run: echo "LUAROCKS_VERSION=scm" >> $GITHUB_ENV
23+
- name: Get tag Version
24+
if: github.event_name != 'push'
2125
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
26+
- name: Get Revision
27+
if: github.event_name == 'push'
28+
run: echo "LUAROCKS_SPECREV=$(git log --oneline | wc -l)" >> $GITHUB_ENV
2229

2330
# Needed to install the tree-sitter parser dependency
2431
- name: Install C/C++ Compiler
@@ -36,6 +43,7 @@ jobs:
3643
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
3744
with:
3845
version: ${{ env.LUAROCKS_VERSION }}
46+
specrev: ${{ env.LUAROCKS_SPECREV }}
3947
dependencies: |
4048
neotest
4149
tree-sitter-c_sharp

0 commit comments

Comments
 (0)