-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: Update publishing workflow & make it single-step
Changelog in Marketplace entry is sourced automatically from Changelog.md We can continue updating that changelog manually and ensure it's not forgotten via a custom input where a maintainer has to confirm this. We can also continue copy-pasting the relevant part of changelog into GitHub Release notes. Lastly we should not need to continue publishing the vsix to GitHub as this encourages a bad practice of users installing released extension outside of Marketplace.
- Loading branch information
1 parent
4e9e99d
commit 13cd117
Showing
3 changed files
with
43 additions
and
48 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
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 |
---|---|---|
@@ -1,23 +1,56 @@ | ||
name: Publish release | ||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to publish & tag & push (without "v" prefix)' | ||
required: true | ||
changelog_updated: | ||
description: 'Did you update the changelog? ("yes")' | ||
required: true | ||
|
||
jobs: | ||
publish: | ||
name: Publish to Marketplace | ||
name: Publish to VS Code Marketplace | ||
runs-on: windows-latest | ||
steps: | ||
- name: Ensure changelog is updated | ||
if: ${{ github.event.inputs.changelog_updated != 'yes' }} | ||
run: | | ||
echo "Response: ${{ github.event.inputs.changelog_updated }} (expected yes)" | ||
exit 1 | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Node | ||
- name: Read Node.js version | ||
id: nodejs-version | ||
run: | | ||
$content = Get-Content .\.nvmrc -Raw | ||
echo "::set-output name=content::$content" | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14.x' | ||
- name: Clean install dependencies | ||
# See https://github.com/actions/setup-node/issues/32 | ||
node-version: ${{ steps.nodejs-version.outputs.content }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Terraform | ||
uses: hashicorp/setup-terraform@v1 | ||
with: | ||
terraform_wrapper: false | ||
terraform_version: "~1.0" | ||
- name: npm test | ||
run: npm test | ||
- name: Configure git author | ||
run: | | ||
git config user.email "hashibot-feedback@hashicorp.com" | ||
git config user.name "HashiBot" | ||
- name: vsce publish | ||
run: vsce publish | ||
run: npx -- vsce publish ${{ github.event.inputs.version }} | ||
env: | ||
VSCE_PAT: ${{ secrets.VSCE_PAT }} | ||
- name: git push | ||
run: | | ||
$defaultBranch = git branch --show-current | ||
git push origin $defaultBranch | ||
git push origin v${{ github.event.inputs.version }} |
This file was deleted.
Oops, something went wrong.