Skip to content

Commit

Permalink
update workflow bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
lyu571 committed Nov 3, 2023
1 parent 6208fdc commit 5e5fe90
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 46 deletions.
53 changes: 28 additions & 25 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
name: pre-release
on:
push:
branches:
- master
tags:
- v*
- v*.*.*
push:
branches:
- master
tags:
- v*
- v*.*.*

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- run: npm install
- run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
- name: Pre release
if: success() && startsWith(github.ref, 'refs/tags/')
run: vsce package --no-yarn
env:
VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }}
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- run: npm install
- name: Run headless test
uses: coactions/setup-xvfb@v1
if: runner.os == 'Linux'
with:
run: xvfb-run -a npm test
- run: npm test
if: runner.os != 'Linux'
- name: Pre release
if: success() && startsWith(github.ref, 'refs/tags/')
run: vsce package --no-yarn
env:
VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }}
40 changes: 20 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: release
on:
push:
branches:
- master
release:
types:
- created
push:
branches:
- master
release:
types:
- created

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Publish to vs marketplace
if: success() && startsWith(github.ref, 'refs/tags/')
run: npm run release
env:
VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }}
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Publish to vs marketplace
if: success() && startsWith(github.ref, 'refs/tags/')
run: npm run release
env:
VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
"release": "vsce publish --no-yarn",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "npm run compile && node ./out/test/runTest.js",
"test": "npm run compile",
"vscode:prepublish": "npm run esbuild-base -- --minify",
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node",
"esbuild": "npm run esbuild-base -- --sourcemap",
Expand Down

0 comments on commit 5e5fe90

Please sign in to comment.