-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub releases to publish workflow
- Loading branch information
Showing
3 changed files
with
37 additions
and
27 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 |
---|---|---|
|
@@ -16,22 +16,22 @@ jobs: | |
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Install Dependencies | ||
run: | | ||
- name: Install Dependencies # vsce etc | ||
run: | # shell | ||
npm i | ||
npm i @vscode/vsce -g | ||
- name: Build Extension | ||
run: npm run build | ||
- name: Build Extension # build `extension.js` and `*.wasm` files | ||
run: | # shell | ||
npm run build | ||
- name: Setup Github Actions | ||
run: | | ||
- name: Setup Github Actions # allow use of `git push` | ||
run: | # shell | ||
git config --global user.name "RedCMD" | ||
git config --global user.email "[email protected]" | ||
git add . | ||
git diff-index --quiet HEAD || git commit -m "Sync Github Actions" | ||
- name: Publish Pre-release | ||
run: | | ||
vsce publish patch --pre-release -p ${{ secrets.VSCE_PAT }} | ||
git push | ||
- name: Publish Pre-release # upload to Extension Marketplace | ||
run: | # shell | ||
npx vsce publish patch --pre-release -p ${{ secrets.VSCE_PAT }} | ||
git push --follow-tags |
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 |
---|---|---|
|
@@ -5,35 +5,46 @@ on: | |
inputs: | ||
version: | ||
description: 'Version' | ||
default: 'minor x.1.0' | ||
default: 'minor' | ||
type: choice | ||
options: | ||
- patch x.x.1 | ||
- minor x.1.0 | ||
- major 1.0.0 | ||
- patch | ||
- minor | ||
- major | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Install Dependencies | ||
run: | | ||
- name: Install Dependencies # vsce etc | ||
run: | # shell | ||
npm i | ||
npm i @vscode/vsce -g | ||
- name: Build Extension | ||
run: npm run build | ||
- name: Build Extension # build `extension.js` and `*.wasm` files | ||
run: | # shell | ||
npm run build | ||
- name: Setup Github Actions | ||
run: | | ||
- name: Setup Github Actions # allow use of `git push` | ||
run: | # shell | ||
git config --global user.name "RedCMD" | ||
git config --global user.email "[email protected]" | ||
git add . | ||
git diff-index --quiet HEAD || git commit -m "Sync Github Actions" | ||
- name: Publish Release | ||
run: | | ||
vsce publish ${{ github.event.inputs.version }} -p ${{ secrets.VSCE_PAT }} | ||
git push | ||
- name: Package Extension # `.vsix` file | ||
run: | # shell | ||
npx vsce package ${{ github.event.inputs.version }} | ||
git push --follow-tags | ||
echo "VERSION=$(node -p "require('./package.json').version")" >> "$GITHUB_ENV" | ||
- name: Generate Release # create release page on github with `.vsix` file | ||
run: | # shell | ||
gh release create v$VERSION --generate-notes tmlanguage-syntax-highlighter-$VERSION.vsix | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
- name: Publish Release # upload to Extension Marketplace | ||
run: | # shell | ||
npx vsce publish -p ${{ secrets.VSCE_PAT }} --packagePath tmlanguage-syntax-highlighter-$VERSION.vsix |
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
c0e96af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove .vsix file from files
#13