Skip to content

chore: Remove unnecessary injection from package.json #39

chore: Remove unnecessary injection from package.json

chore: Remove unnecessary injection from package.json #39

Workflow file for this run

on:
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: install gitversion tool
uses: gittools/actions/gitversion/setup@v0.9
with:
versionSpec: '6.0.0-beta.3'
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: execute gitversion
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/execute@v0.9.3
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: build grammars
run: yarn build:grammars
- name: add and commit grammars
uses: EndBug/add-and-commit@v9
with:
add: 'syntaxes'
default_author: github_actions
message: 'chore: build grammar json files for ${{ steps.gitversion.outputs.majorMinorPatch }}'
- name: update metadata in package.json
uses: onlyutkarsh/patch-files-action@v1.0.1
with:
files: '${{github.workspace}}/package.json'
patch-syntax: |
= /version => "${{ steps.gitversion.outputs.majorMinorPatch }}"
- name: run prettier
run: yarn prettier:package
- name: add and commit package.json
uses: EndBug/add-and-commit@v9
with:
add: 'package.json'
default_author: github_actions
message: 'chore: update package.json version to ${{ steps.gitversion.outputs.majorMinorPatch }}'
tag: 'v${{ steps.gitversion.outputs.majorMinorPatch }}'
- name: compile for node
run: yarn node:package
- name: compile for worker
run: yarn web:package
- name: compile and create vsix
run: yarn vs:package
- name: upload vsix as artifact
uses: actions/upload-artifact@v2
with:
name: vscode-glimmer-syntax-${{steps.gitversion.outputs.majorMinorPatch}}.vsix
path: ${{github.workspace}}/vscode-glimmer-syntax-${{steps.gitversion.outputs.majorMinorPatch}}.vsix
- name: publish to marketplace VSCODE
if: github.ref == 'refs/heads/master'
env:
VSCODE_STORE_TOKEN: ${{ secrets.VSCODE_STORE_TOKEN }} # This token is provided by Actions, you do not need to create your own token
run: yarn vs:publish:ci
- name: publish to marketplace OPEN VSX
if: github.ref == 'refs/heads/master'
env:
OPEN_VSX_STORE_TOKEN: ${{ secrets.OPEN_VSX_STORE_TOKEN }} # This token is provided by Actions, you do not need to create your own token
run: yarn ov:publish:ci
- name: create a release
if: github.ref == 'refs/heads/master'
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.majorMinorPatch }}
release_name: v${{ steps.gitversion.outputs.majorMinorPatch }}