Skip to content

Commit

Permalink
Merge pull request #6 from tencentcloudstack/feat/enable-actions
Browse files Browse the repository at this point in the history
enable release and pre-release actions.
  • Loading branch information
lyu571 authored Nov 3, 2023
2 parents 35411e7 + 131e856 commit 6208fdc
Show file tree
Hide file tree
Showing 5 changed files with 1,038 additions and 23 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: pre-release
on:
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 }}
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: release
on:
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 }}
4 changes: 3 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
**/*.ts
node_modules
src/
Loading

0 comments on commit 6208fdc

Please sign in to comment.