Skip to content

Merge pull request #134 from percolate/revert-133-chore/fix-yml-syntax #11

Merge pull request #134 from percolate/revert-133-chore/fix-yml-syntax

Merge pull request #134 from percolate/revert-133-chore/fix-yml-syntax #11

name: Build and Deploy
on:
push:
branches:
- master
jobs:
core:
runs-on: ubuntu-latest
steps:
- name: Check git version
run: git --version
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: '0'
submodules: 'recursive'
- uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ca-certificates git openssh-client
yarn --pure-lockfile --cache-folder /tmp/.yarn_cache
- name: Cache node modules
uses: actions/cache@v3
with:
path: |
node_modules
/tmp/.yarn_cache
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: NPM login
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPMJS_TOKEN }}" >> ~/.npmrc
- name: Verify .git directory
run: |
ls -la .git
- name: Build, verify, ts, lint, commit validate, test, and coverage
run: |
npx lerna run build
npx kona verify
npx kona ts
npx kona lint
npx kona commit validate
npx kona test --coverage
npx kona coverage
- name: Deploy
if: github.ref == 'refs/heads/master'
run: yarn lerna:publish --yes
- name: Store test results
uses: actions/upload-artifact@v3
with:
name: reports
path: tmp/reports
press:
needs: core
runs-on: ubuntu-latest
container:
image: node:14-alpine
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Docker client
run: apk add --no-cache docker
- name: NPM login
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPMJS_TOKEN }}" >> ~/.npmrc
- name: Install Press
run: yarn global add @percolate/press
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push Docker images
run: |
docker build \
--build-arg NPMJS_TOKEN \
--build-arg VERSION=$(press --version) \
--tag blend/press \
pkgs/press
press push blend/press --repo="percolate/blend/press" --semver=$(press --version)