Skip to content

Commit

Permalink
Merge pull request #40 from remarkjs/feature/gh-38_vs_marketplace
Browse files Browse the repository at this point in the history
Publish to VS Marketplace
  • Loading branch information
asbjornu authored Mar 21, 2021
2 parents 078289c + 70955f9 commit abcb185
Show file tree
Hide file tree
Showing 6 changed files with 3,857 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/gitversion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mode: ContinuousDeployment
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

0 comments on commit abcb185

Please sign in to comment.