Merge pull request #214 from eclipse-cdt-cloud/dependabot/npm_and_yar… #490
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
name: ci | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 18.x | |
- name: Build | |
env: | |
GITHUB_TOKEN: ${{github.token}} | |
run: | | |
yarn install --ignore-scripts | |
yarn build | |
yarn package | |
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 | |
with: | |
name: vsix-package | |
path: ./*.vsix | |
retention-days: 1 | |
release: | |
needs: build | |
name: Create Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e | |
with: | |
path: artifacts | |
- uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 | |
with: | |
files: artifacts/*/*.vsix | |
publish-open-vsx-registry: | |
needs: build | |
name: Open VSX | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e | |
with: | |
path: artifacts | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 18.x | |
- name: Publish | |
run: | | |
npx [email protected] publish -i artifacts/*/*.vsix -p ${{secrets.OPEN_VSX_TOKEN}} --debug | |
publish-vscode-marketplace: | |
needs: build | |
name: VS Code Marketplace | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e | |
with: | |
path: artifacts | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 18.x | |
- name: Publish | |
run: | | |
npx vsce publish -i artifacts/*/*.vsix -p ${{secrets.VS_MARKETPLACE_TOKEN}} |