fix(release): pin @nx/js to ~23.1.3 and detect release staging failur… #916
This file contains hidden or 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: Semantic Release | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Needed for nx to push tags and create GitHub releases | |
| id-token: write # Needed for npm trusted publishing (OIDC) | |
| 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 "hkfb@users.noreply.github.com" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org/ | |
| - 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 }} | |
| npm_config_legacy_peer_deps: false # `nx release version` corrupts package-lock.json. See https://github.com/nrwl/nx/issues/22066#issuecomment-2576366862 |