Skip to content

make_release

make_release #107

Workflow file for this run

name: make_release
on:
workflow_dispatch:
inputs:
npmVersion:
description: 'NPM Version (<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | ...)'
required: true
default: 'patch'
comment:
description: 'Added to end of commit message and annotated git tag'
required: true
default: ' ()'
# push:
# branches: [ master ]
# NOTE: workspaces have a bunch of issues with npm version! 'npm version' doesn't add a commit + tag :(
# once there are multiple packages can revisit the step that commits.
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
git config user.name "Brian Zinn"
git config user.email "[email protected]"
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
scope: brianzinn
- name: install deps
# npm ci
run: |
npm install --legacy-peer-deps
- name: build test coverage
run: |
npm run build -w packages/react-babylonjs
npm run test:coverage -w packages/react-babylonjs
- name: version-changelog-commit
run: |
npm version ${{ github.event.inputs.npmVersion }} -w packages/react-babylonjs
git status
PACKAGE_VERSION=$(cat packages/react-babylonjs/package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
git add packages/react-babylonjs/package.json
git commit -m "release ${PACKAGE_VERSION} :package:${{ github.event.inputs.comment }}"
git status
git tag -a v${PACKAGE_VERSION} -m "version ${PACKAGE_VERSION}"
git push --follow-tags
git status
sleep 1m
./node_modules/.bin/gren release --tags=v${PACKAGE_VERSION}
env:
GREN_GITHUB_TOKEN: ${{ secrets.GREN_GITHUB_TOKEN }}
- name: publish npm
working-directory: ./packages/react-babylonjs
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: publish to coveralls.io
uses: coverallsapp/[email protected]
with:
github-token: ${{ github.token }}
path-to-lcov: ./packages/react-babylonjs/coverage/lcov.info