Merge pull request #1531 from data-driven-forms/dependabot/npm_and_ya… #5
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: Release | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| name: Release Packages | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ssh-key: ${{ secrets.BOT_SSH_KEY }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Update npm to latest version | |
| run: npm install -g [email protected] | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Derive appropriate SHAs for base and head for nx affected commands | |
| uses: nrwl/nx-set-shas@v4 | |
| with: | |
| main-branch-name: 'master' | |
| - name: Build affected packages | |
| run: npx nx affected --target=build --parallel=3 | |
| - name: 🚀 Run Nx Release | |
| run: | | |
| git config --global user.email "${{ secrets.RELEASE_EMAIL }}" | |
| git config --global user.name "${{ secrets.RELEASE_USERNAME }}" | |
| npx nx release -y | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: true | |
| npm_config_legacy_peer_deps: false |