This repository was archived by the owner on Apr 24, 2025. It is now read-only.
Merge pull request #31 from Rezonate-io/fix-all #36
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 | |
| env: | |
| NX_BRANCH: ${{ github.event.number }} | |
| NX_RUN_GROUP: ${{ github.run_id }} | |
| jobs: | |
| prepare-env: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| GITHUB_HEAD_REF: ${{ steps.script.outputs.headRef }} | |
| GITHUB_BASE_REF: ${{ steps.script.outputs.tagHash }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache node modules | |
| id: cache | |
| uses: actions/cache@v2 | |
| with: | |
| path: | | |
| **/node_modules | |
| key: ${{ env.DEPENDENCIES_CACHE }}-${{ hashFiles('package-lock.json') }} | |
| - name: npm install | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: npm install | |
| - name: Set correct env vars | |
| id: script | |
| uses: ./tools/actions/set-master-vars | |
| release: | |
| needs: [ prepare-env ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache node modules | |
| id: cache | |
| uses: actions/cache@v2 | |
| with: | |
| path: | | |
| **/node_modules | |
| key: ${{ env.DEPENDENCIES_CACHE }}-${{ hashFiles('package-lock.json') }} | |
| - name: Install dependencies | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: npm ci --ignore-scripts | |
| - name: GIT config | |
| run: | | |
| git config user.name "${GITHUB_ACTOR}" | |
| git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
| - uses: nrwl/nx-set-shas@v4 | |
| - name: nx workspace:version | |
| run: npx nx run workspace:version | |
| - name: nx affected:build | |
| run: npx nx affected -t build | |
| - name: nx affected:publish | |
| run: | | |
| echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc | |
| npx nx run-many -t publish --all --base origin/master | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| changelog-task: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - release | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache node modules | |
| uses: actions/cache@v2 | |
| with: | |
| path: | | |
| **/node_modules | |
| key: ${{ env.DEPENDENCIES_CACHE }}-${{ hashFiles('package-lock.json') }} | |
| - name: GIT config | |
| run: | | |
| git config user.name "${GITHUB_ACTOR}" | |
| git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
| - name: nx workspace:version | |
| run: npx nx run workspace:version --prod | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |