WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 42 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,52 @@
name: Release

on:
workflow_dispatch:
inputs:
publish_openvsx:
description: 'Publish to Open VSX'
type: boolean
required: true
default: true
publish_marketplace:
description: 'Publish to Marketplace'
type: boolean
required: true
default: true

release:
types: [created]

jobs:
release:
name: Release and publish
name: Release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- run: npm install
- uses: lannonbr/vsce-action@master
- name: Checkout
uses: actions/checkout@v4
with:
args: "publish -p $PUBLISHER_TOKEN"
ref: main

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'

- name: Install NPM Dependencies
run: |
npm install
npm install -g vsce ovsx

- name: Publish to Open VSX
if: github.event_name == 'release' || inputs.publish_openvsx == true
run: npx ovsx publish -p $OPENVSX_TOKEN
env:
OPENVSX_TOKEN: ${{ secrets.OPENVSX_TOKEN }}

- name: Publish to Marketplace
if: github.event_name == 'release' || inputs.publish_marketplace == true
run: vsce publish -p $PUBLISHER_TOKEN
env:
PUBLISHER_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}