Skip to content

ci: publish only on tags (#17) #9

ci: publish only on tags (#17)

ci: publish only on tags (#17) #9

Workflow file for this run

name: publish release to marketplace
on:
push:
branches:
- main
permissions:
contents: write
jobs:
publish:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: |
bun install
bun run build:vsix
echo "filepath=$(ls dist/*.vsix)" >> $GITHUB_ENV
echo "version=$(ls dist/*.vsix | grep -oE '\d+\.\d+\.\d+')" >> $GITHUB_ENV
- env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: bun run vsce publish --packagePath $filepath
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create v$version $filepath --generate-notes --verify-tag