Skip to content

docs(core): increase build memory #17

docs(core): increase build memory

docs(core): increase build memory #17

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
env:
NODE_VERSION: '20.14.0'
CACHE_KEY_PREFIX: avati-monorepo
concurrency:
group: release
cancel-in-progress: false
jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
id-token: write
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
- name: Fetch all tags
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
git fetch --prune --unshallow
- name: Set up Git branch
run: |
git checkout master
git pull origin master
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Setup NPM Authentications
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: |
if [ -n "$NODE_AUTH_TOKEN" ]; then
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > ~/.npmrc
fi
- name: Validate npm authentication
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: |
if [ -n "$NODE_AUTH_TOKEN" ]; then
npm whoami
else
echo "No NPM token provided"
exit 1
fi
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build packages
run: yarn build
- name: Generate changelog
run: yarn generate-changelog
- name: Create or Update Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
# Read the changelog content
CHANGELOG_CONTENT=$(cat ./CHANGELOG.md)
# Check if release exists
if gh release view "$TAG_NAME" &>/dev/null; then
echo "Updating existing release for $TAG_NAME"
gh release edit "$TAG_NAME" \
--title "Release $TAG_NAME" \
--notes "$CHANGELOG_CONTENT"
else
echo "Creating new release for $TAG_NAME"
gh release create "$TAG_NAME" \
--title "Release $TAG_NAME" \
--notes "$CHANGELOG_CONTENT"
fi
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: |
yarn lerna publish from-git --yes
- name: Cleanup NPM Authentication
if: always()
run: rm -f ~/.npmrc