set action to v1.5.0 #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main, beta, prerelease ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '18.19.0' | |
- run: yarn | |
- run: yarn prepare-beta | |
if: ${{ steps.extract_branch.outputs.branch == 'beta' }} | |
- name: Run headless test | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
run: yarn test | |
- run: yarn run prettier:check | |
- run: yarn run lint | |
- name: Publish to Visual Studio Marketplace | |
if: ${{ steps.extract_branch.outputs.branch != 'prerelease' }} | |
uses: HaaLeo/publish-vscode-extension@v1 | |
with: | |
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} | |
registryUrl: https://marketplace.visualstudio.com | |
yarn: true | |
- name: Publish to Visual Studio Marketplace for pre-release | |
if: ${{ steps.extract_branch.outputs.branch == 'prerelease' }} | |
uses: HaaLeo/[email protected] | |
with: | |
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} | |
registryUrl: https://marketplace.visualstudio.com | |
yarn: true | |
preRelease: true | |
- name: Publish to Open VSX Registry | |
uses: HaaLeo/publish-vscode-extension@v0 | |
with: | |
pat: ${{ secrets.OPEN_VSX_TOKEN }} | |
yarn: true |