Skip to content

Commit

Permalink
Keep use on-push for tags (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
namse authored Jul 17, 2023
1 parent 7ddc2da commit 1839efd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/publish-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ on:
push:
branches:
- master
create:
tags:
- 'extension-*'
- 'extension/*'
pull_request:

concurrency:
Expand Down Expand Up @@ -62,22 +61,22 @@ jobs:
export EXTENSION_VERSION=$(node -p "require('./package.json').version")
echo "Extension version: $EXTENSION_VERSION"
export TAG="extension-$EXTENSION_VERSION"
export TAG="extension/$EXTENSION_VERSION"
echo "Tag: $TAG"
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "tag already exists";
else
git tag -a "$TAG" -m "$TAG"
git push origin "$TAG"
git push origin "$TAG"
fi
- name: create release
if: success() && startsWith(github.ref, 'refs/tags/extension-')
if: success() && startsWith(github.ref, 'refs/tags/extension/')
uses: softprops/action-gh-release@v1

- name: publish
if: success() && startsWith(github.ref, 'refs/tags/extension-')
if: success() && startsWith(github.ref, 'refs/tags/extension/')
working-directory: extension
run: |
npm install -g vsce
Expand Down

0 comments on commit 1839efd

Please sign in to comment.