Skip to content

v3.1.0-alpha.53

v3.1.0-alpha.53 #42

Workflow file for this run

name: Deployment
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:9.6.17
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
steps:
- name: GenerateVersion
id: GenerateVersion
run: |
export BASE_VERSION="$GITHUB_REF"
echo "Base version is $BASE_VERSION"
[ ! -z "$BASE_VERSION" ]
export VERSION=`echo "$BASE_VERSION" | grep -Po '[0-9].*'`
echo "Version is $VERSION"
[ ! -z "$VERSION" ]
echo "::set-output name=version::$VERSION"
- uses: actions/[email protected]
- name: Use Node 16
uses: actions/[email protected]
with:
node-version: "16.x"
- name: Cache node modules
uses: actions/[email protected]
with:
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.lock') }}
- name: Install Dependencies and Test
run: npm ci
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Test
run: npm run test
env:
PORT: 12000
PGHOST: 127.0.0.1
PGUSER: postgres
PGPASSWORD: postgres
PGPORT: 5432
PGSSL: false
- name: Version
env:
VERSION: ${{ steps.GenerateVersion.outputs.version }}
run: |
npm run lerna version --no-git-tag-version -y "$VERSION"
npm run format
- name: Repush
env:
VERSION: ${{ steps.GenerateVersion.outputs.version }}
run: |
git config --global user.name 'Github Actions'
git config --global user.email 'githubactions'
git commit -am "v$VERSION"
git tag -f -a "v$VERSION" -m "v$VERSION"
git branch -va
git push -f --tags
git push origin HEAD:main
- name: Publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
VERSION: ${{ steps.GenerateVersion.outputs.version }}
run: |
scripts/run-in-packages.sh npm publish --access public --tag $VERSION
scripts/run-in-packages.sh npm publish --access public