Skip to content

chore: bump the nx group in /typescript with 2 updates (#2594) #18

chore: bump the nx group in /typescript with 2 updates (#2594)

chore: bump the nx group in /typescript with 2 updates (#2594) #18

name: Semantic Release
on:
push:
branches:
- 'master'
jobs:
release:
runs-on: ubuntu-latest
steps:
# Inspired by https://medium.com/@michadrabikowski/automated-releases-with-nx-and-github-actions-07f574041293
- name: 📖 Checkout commit locally
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
- name: Configure git
run: |
git config --global user.name "hkfb"
git config --global user.email "[email protected]"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
# Needed for registry authentication in the publish step (https://github.com/actions/setup-node?tab=readme-ov-file#usage)
registry-url: https://registry.npmjs.org/
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 📦 Install build dependencies
working-directory: ./typescript
run: |
npm ci CYPRESS_INSTALL_BINARY=0 --ignore-scripts
- name: 🏗️ Build packages
working-directory: ./typescript
run: |
npx nx run-many -t build
- name: 🔼 Run Nx release
working-directory: ./typescript
run: npx nx release --yes
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
npm_config_legacy_peer_deps: false # `nx release version` corrupts package-lock.json. See https://github.com/nrwl/nx/issues/22066#issuecomment-2576366862