Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish to VS Marketplace #40

Merged
merged 20 commits into from
Mar 21, 2021
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/gitversion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mode: ContinuousDeployment
wooorm marked this conversation as resolved.
Show resolved Hide resolved
35 changes: 33 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,43 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
env:
cache-name: cache-npm
with:
path: ~/.npm
key: ${{runner.os}}-build-${{env.cache-name}}-${{hashFiles('**/package-lock.json')}}
restore-keys: ${{runner.os}}-build-${{env.cache-name}}-
- run: npm install
- run: npm run build
- name: run headless test
- uses: actions/upload-artifact@v2
with:
name: out
path: out
- name: test
uses: GabrielBB/xvfb-action@v1.4
with:
run: npm test

package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
env:
cache-name: cache-npm
with:
path: ~/.npm
key: ${{runner.os}}-build-${{env.cache-name}}-${{hashFiles('**/package-lock.json')}}
restore-keys: ${{runner.os}}-build-${{env.cache-name}}-
- run: npm install
- run: npm run build
- name: vsce package
run: $(npm bin)/vsce package
- uses: actions/upload-artifact@v2
with:
name: vscode-remark.vsix
path: '*.vsix'
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'
- uses: gittools/actions/gitversion/execute@v0.9.7
id: gitversion
with:
useConfigFile: true
configFilePath: .github/gitversion.yml
- uses: actions/cache@v2
env:
cache-name: cache-npm
with:
path: ~/.npm
key: ${{runner.os}}-build-${{env.cache-name}}-${{hashFiles('**/package-lock.json')}}
restore-keys: ${{runner.os}}-build-${{env.cache-name}}-
- name: npm version
run: npm version --no-git-tag-version ${{steps.gitversion.outputs.fullSemVer}}
- run: npm install
- run: npm run build
- name: vsce package
run: $(npm bin)/vsce package
- uses: actions/upload-artifact@v2
with:
name: vscode-remark.vsix
path: '*.vsix'
- name: vsce publish
run: $(npm bin)/vsce publish --pat ${{secrets.VSCE_TOKEN}}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ out/

# Visual Studio Code's user directories
.vscode*

# Visual Studio Code Extension package
*.vsix
Loading