Skip to content

chore: format

chore: format #23

Workflow file for this run

name: Release
permissions:
contents: write
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+" # Minor version should be even for release and odd for pre-release
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Compile
run: npm run compile
- name: Resolve is pre-release
id: is_prerelease
run: echo "prerelease=$(node -p "'${{ github.ref }}'.split('.')[1] % 2 == 1")" >> $GITHUB_OUTPUT
- name: Publish Extension (Pre-Release)
if: steps.is_prerelease.outputs.prerelease == 'true'
run: |
npx @vscode/vsce package --no-git-tag-version --pre-release $GITHUB_REF_NAME
npx @vscode/vsce publish --no-git-tag-version --pre-release $GITHUB_REF_NAME
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Publish Extension
if: steps.is_prerelease.outputs.prerelease == 'false'
run: |
npx @vscode/vsce package --no-git-tag-version $GITHUB_REF_NAME
npx @vscode/vsce publish --no-git-tag-version $GITHUB_REF_NAME
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Create GitHub Release
if: steps.is_prerelease.outputs.prerelease == 'false'
id: create_release
uses: softprops/action-gh-release@v1
with:
files: phpunit-*.vsix