Skip to content

fix(files): arrange-imports for multipart session (#1171) #428

fix(files): arrange-imports for multipart session (#1171)

fix(files): arrange-imports for multipart session (#1171) #428

Workflow file for this run

name: CD
on:
push:
branches:
- master
- 'release-*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('package.json') }}
- name: Install 🔧 # Installs dependencies
run: yarn install --immutable
- name: Build
run: yarn build
publish:
if: |-
${{
!contains(github.event.commits[0].message, '[skip-ci]') &&
(
startsWith(github.event.commits[0].message, 'fix:') ||
startsWith(github.event.commits[0].message, 'fix(') ||
startsWith(github.event.commits[0].message, 'feat:') ||
startsWith(github.event.commits[0].message, 'feat(') ||
contains(github.event.commits[0].message, '[release]')
)
}}
runs-on: ubuntu-latest
environment: CD
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('package.json') }}
- name: Install 🔧 # Installs dependencies
run: yarn install --immutable
- name: Lerna env config
run: |
git config --global user.email "[email protected]"
git config --global user.name "Cognite CICD"
git remote set-url origin "https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" > /dev/null 2>&1
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
env:
NPM_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
GITHUB_TOKEN: ${{secrets.GH_LERNA_TOKEN}} # Temporary fix to make lerna able to push the new versions commit to master
- name: Build
run: yarn build
- name: Build doc
run: yarn docs:bundle
- name: Lerna version
env:
GH_TOKEN: ${{ secrets.GH_LERNA_TOKEN }} # Temporary fix to make lerna able to push the new versions commit to master
GITHUB_TOKEN: ${{ secrets.GH_LERNA_TOKEN }} # Temporary fix to make lerna able to push the new versions commit to master
run: yarn lerna version --conventional-commits --create-release github --no-private --yes
- name: Lerna Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: yarn lerna publish from-package --yes --no-git-reset --no-verify-access
- name: Publish documentation
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs