Updated to Node 20 #128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Management | |
on: | |
push: | |
branches: [main, develop] | |
pull_request: | |
branches: [develop] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "20.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install Yarn | |
run: npm install -g yarn | |
- name: Install Dependencies | |
run: yarn install | |
- name: Lint Package | |
run: npx lerna run lint | |
- name: Test Package | |
run: npx lerna run test | |
- name: Verify Building Package | |
run: npx lerna run build | |
pre_release: | |
runs-on: ubuntu-latest | |
needs: build | |
if: ${{ github.ref == 'refs/heads/develop' && github.event_name == 'push' }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "20.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install Yarn | |
run: npm install -g yarn | |
- name: Install Dependencies | |
run: yarn install | |
- name: Build Package | |
run: npx lerna run build | |
- name: Publish Package | |
run: | | |
rm -rf packages/core/src/tools/__generated__ | |
npx lerna publish $(yarn --silent ci:version)-pre.${{ github.run_number }} --exact --yes --no-git-tag-version --dist-tag next | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "20.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install Yarn | |
run: npm install -g yarn | |
- name: Install Dependencies | |
run: yarn install | |
- name: Build Package | |
run: npx lerna run build | |
- name: Publish Package | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "github-actions-bot" | |
yarn ci:version --update | |
rm -rf packages/core/src/tools/__generated__ | |
git add CHANGELOG.md | |
git commit -m "updated release date" | |
npx lerna publish $(yarn --silent ci:version) --exact --yes --dist-tag latest --message '[skip ci] publish release' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
- name: Deploy Website | |
run: | | |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
cp packages/example-app/dist/release/index.html packages/example-app/dist/release/404.html | |
yarn ci:deploy -- -u "github-actions-bot <[email protected]>" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |