fix: force CI for openvsx release. Update readme links. #7
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
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'feature/**' # match an pushes on feature/* and feature/<any sub branch>/* | |
- master | |
paths-ignore: # dont run when changes made to these folders | |
- '.vscode/**' | |
jobs: | |
cicd: | |
name: cicd | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v2 | |
- name: fetch all history and tags from all branches for gitversion | |
run: git fetch --prune --unshallow | |
- name: DotNet Core SDK 3.1.0 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.x | |
- name: install gitversion tool | |
uses: gittools/actions/gitversion/[email protected] | |
with: | |
versionSpec: '5.5.x' | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
- name: execute gitversion | |
id: gitversion # step id used as reference for output values | |
uses: gittools/actions/gitversion/[email protected] | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
- name: print gitversion | |
run: | | |
echo "Major: ${{ steps.gitversion.outputs.major }}" | |
echo "Minor: ${{ steps.gitversion.outputs.minor }}" | |
echo "Patch: ${{ steps.gitversion.outputs.patch }}" | |
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}" | |
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}" | |
- name: setup node | |
uses: volta-cli/action@v1 | |
- name: install dependencies | |
run: yarn install --frozen-lockfile | |
- name: update metadata in package.json | |
uses: onlyutkarsh/[email protected] | |
with: | |
files: '${{github.workspace}}/package.json' | |
patch-syntax: | | |
= /version => "${{ steps.gitversion.outputs.majorMinorPatch }}" | |
- name: add version in CHANGELOG.md | |
uses: cschleiden/[email protected] | |
with: | |
files: '${{github.workspace}}/CHANGELOG.md' | |
env: | |
VERSION: "${{ steps.gitversion.outputs.majorMinorPatch }}" | |
- name: compile browser client | |
run: yarn web:package | |
- name: compile node client | |
run: yarn node:package | |
- name: compile and create vsix | |
run: yarn vs:package | |
- name: upload vsix as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: vscode-ember-${{steps.gitversion.outputs.majorMinorPatch}}.vsix | |
path: ${{github.workspace}}/vscode-ember-${{steps.gitversion.outputs.majorMinorPatch}}.vsix | |
- name: create a release | |
if: github.ref == 'refs/heads/master' | |
continue-on-error: false | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: v${{ steps.gitversion.outputs.semVer }} | |
release_name: v${{ steps.gitversion.outputs.semVer }} | |
- name: publish to marketplace VSCODE | |
if: github.ref == 'refs/heads/master' | |
env: | |
VSCODE_STORE_TOKEN: ${{ secrets.VSCODE_STORE_TOKEN }} | |
run: yarn vs:publish:ci | |
continue-on-error: true | |
- name: publish to marketplace OPEN VSX | |
if: github.ref == 'refs/heads/master' | |
env: | |
OPEN_VSX_STORE_TOKEN: ${{ secrets.OPEN_VSX_STORE_TOKEN }} | |
run: yarn ov:publish:ci | |
continue-on-error: true |