Skip to content

Commit

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

concurrency:
Expand Down Expand Up @@ -52,6 +50,7 @@ jobs:
run: cargo test

- name: create tag
id: tag
if: success() && startsWith(github.ref, 'refs/heads/master')
working-directory: extension
run: |
Expand All @@ -69,14 +68,18 @@ jobs:
else
git tag -a "$TAG" -m "$TAG"
git push origin "$TAG"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
fi
- name: create release
if: success() && startsWith(github.ref, 'refs/tags/extension/')
if: steps.tag.outputs.tag
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag.outputs.tag }}

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

0 comments on commit ed6f5fe

Please sign in to comment.