-
Notifications
You must be signed in to change notification settings - Fork 11
39 lines (37 loc) · 1.35 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Release
on:
workflow_dispatch:
inputs:
githubRelease:
description: 'Create a GitHub release (release branches only)'
default: true
type: boolean
marketplaceRelease:
description: 'Publish to VSCode Marketplace (release branches only)'
default: true
type: boolean
jobs:
build:
uses: ./.github/workflows/build.yml
publish:
if: startsWith(github.ref, 'refs/heads/release/')
runs-on: ubuntu-latest
needs: build
steps:
- name: Download Build Artifact
uses: actions/[email protected]
with:
name: extension
path: ./artifacts
- name: Create Release
uses: marvinpinto/[email protected]
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: ${{ contains(needs.build.outputs.extensionVersion, '-preview') }}
title: Release ${{ needs.build.outputs.extensionVersion }}
automatic_release_tag: ${{ needs.build.outputs.extensionVersion }}
files: |
*.vsix
- name: Publish debug extension to VSCode Marketplace
if: startsWith(github.ref, 'refs/heads/release/')
run: npx vsce publish -i ${{ format('./artifacts/neo3-visual-tracker-{0}.vsix', needs.build.outputs.extensionVersion) }} -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}