-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added release workflow but left publish disabled
- Loading branch information
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Build & Publish | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
dry_run: | ||
type: boolean | ||
required: true | ||
default: false | ||
description: Dry run, will not push branches or upload the artifact to marketplace. | ||
as_draft: | ||
type: boolean | ||
required: true | ||
default: false | ||
description: Mark the GitHub release as a draft. | ||
prerelease: | ||
type: boolean | ||
required: true | ||
default: false | ||
description: Mark the GitHub release as a pre-release version. | ||
|
||
jobs: | ||
build: | ||
name: release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
# Run install dependencies | ||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Get current package version | ||
id: package_version | ||
uses: martinbeentjes/[email protected] | ||
|
||
- name: Check version is mentioned in Changelog | ||
uses: mindsers/[email protected] | ||
with: | ||
version: ${{ steps.package_version.outputs.current-version }} | ||
path: 'CHANGELOG.md' | ||
|
||
# - name: Publish to Visual Studio Marketplace | ||
# uses: HaaLeo/publish-vscode-extension@v1 | ||
# id: publishToVSMarketplace | ||
# with: | ||
# pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} | ||
# registryUrl: https://marketplace.visualstudio.com | ||
# dryRun: ${{ github.event.inputs.dry_run == 'true' }} | ||
|
||
# - name: Publish to Open VSX Registry | ||
# uses: HaaLeo/publish-vscode-extension@v1 | ||
# id: publishToOpenVSX | ||
# with: | ||
# pat: ${{ secrets.OPEN_VSX_TOKEN }} | ||
# dryRun: ${{ github.event.inputs.dry_run == 'true' }} | ||
# extensionFile: ${{ steps.publishToVSMarketplace.outputs.vsixPath }} | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: ${{ github.event.inputs.dry_run != 'true' }} | ||
# env: | ||
# GITHUB_REPOSITORY: LangStream/vscode-extension | ||
with: | ||
tag_name: ${{ steps.package_version.outputs.current-version }} | ||
name: ${{ steps.package_version.outputs.current-version }} | ||
body: Publish ${{ steps.package_version.outputs.current-version }} | ||
draft: ${{ github.event.inputs.as_draft == 'true' }} | ||
prerelease: ${{ github.event.inputs.prerelease == 'true' }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
files: ${{ steps.publishToOpenVSX.outputs.vsixPath}} |