refactor: Moved to redis-semaphore package for lock support #24
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: Publish | |
on: | |
release: | |
types: [published] | |
push: | |
branches: | |
- master | |
jobs: | |
publish: | |
if: "!(contains(github.event.head_commit.message, 'chore(release):') || contains(github.event.head_commit.message, 'origin/master'))" # Exclude release bump commits | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # Use the PAT for checkout | |
fetch-depth: '0' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run linter test | |
run: lerna run lint | |
- name: Run circular dependency test | |
run: lerna run check | |
- name: Run compile test | |
run: lerna run compile | |
- name: Run unit tests | |
run: npm test | |
env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
# Configure Git author information | |
- name: Set Git author | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Bump versions | |
run: lerna version | |
env: | |
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- name: Build | |
run: lerna run build | |
- name: "NPM Identity" | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | |
- name: Publish package | |
run: lerna publish from-package --no-verify-access --yes |