Skip to content

Commit d9d7623

Browse files
committed
ci: only publish tagged release
1 parent 072de95 commit d9d7623

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
publish:
8686
name: publish
8787
runs-on: ubuntu-20.04
88-
if: github.event_name == 'push'
88+
if: github.ref_type == 'tag'
8989
needs:
9090
- lint
9191
- format
@@ -96,11 +96,7 @@ jobs:
9696
- name: Get Version
9797
id: lua-evdev-version
9898
run: |
99-
if test "${GITHUB_REF_TYPE}" = "tag"; then
100-
echo "::set-output name=value::${GITHUB_REF_NAME}"
101-
else
102-
echo "::set-output name=value::dev-1"
103-
fi
99+
echo "::set-output name=value::${GITHUB_REF_NAME}"
104100
- name: Get Cache Key
105101
id: luver-cache-key
106102
env:
@@ -123,8 +119,9 @@ jobs:
123119
luarocks_versions: 5.1.5:3.8.0
124120
- name: Publish
125121
env:
126-
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
127122
LUA_EVDEV_VERSION: ${{ steps.lua-evdev-version.outputs.value }}
123+
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
124+
LUAROCKS_UPLOAD_FORCE: ${{ secrets.LUAROCKS_UPLOAD_FORCE }}
128125
run: |
129126
luarocks install lua-cjson
130-
./scripts/publish.sh ${LUA_EVDEV_VERSION} --force
127+
./scripts/publish.sh ${LUA_EVDEV_VERSION}

0 commit comments

Comments
 (0)