Skip to content

Commit

Permalink
build: only publish tagged commits
Browse files Browse the repository at this point in the history
  • Loading branch information
gudzpoz committed Apr 12, 2024
1 parent fd5661e commit 42e20e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: Publish to NPM and LuaRocks

on:
workflow_dispatch:
push:
branches:
- main
tags:
- '*'

jobs:
publish:
Expand Down Expand Up @@ -42,6 +41,7 @@ jobs:
sudo apt update
sudo apt install luarocks lua5.1 lua5.2 lua5.3 lua5.4 luajit lua-busted lua-check
- name: Publish Brocatel VM Runtime to LuaRocks
if: startsWith(github.ref, 'refs/tags/')
env:
ROCKS_TOKEN: ${{ secrets.ROCKS_TOKEN }}
run: |
Expand All @@ -51,6 +51,7 @@ jobs:
make pack
luarocks upload --api-key="${ROCKS_TOKEN}" brocatel-*.rockspec
- name: Publish Brocatel Libraries to NPM
if: startsWith(github.ref, 'refs/tags/')
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: Build VS Code Extension

on:
workflow_dispatch:
push:
branches:
- main
tags:
- '*'

jobs:
extension:
Expand Down Expand Up @@ -36,14 +35,15 @@ jobs:
cd vscode-brocatel
pnpm vscode:prepublish
- name: Publish to Open VSX Registry
if: startsWith(github.ref, 'refs/tags/')
uses: HaaLeo/publish-vscode-extension@v1
id: publishToOpenVSX
with:
dependencies: false
preRelease: true
pat: ${{ secrets.OVSX_TOKEN }}
packagePath: ./vscode-brocatel
- name: Publish to Visual Studio Marketplace
if: startsWith(github.ref, 'refs/tags/')
uses: HaaLeo/publish-vscode-extension@v1
with:
dependencies: false
Expand Down

0 comments on commit 42e20e4

Please sign in to comment.