|
1 | | -name: CI Release |
| 1 | +name: ⚠️ Release |
2 | 2 | on: |
| 3 | + workflow_dispatch: |
3 | 4 | push: |
4 | | - branches: |
5 | | - - master |
| 5 | + branches: [master] |
| 6 | + paths: |
| 7 | + - 'projects/**' |
6 | 8 |
|
7 | 9 | jobs: |
8 | | - release: |
9 | | - runs-on: ubuntu-22.04 |
| 10 | + run-release: |
| 11 | + name: Release |
| 12 | + if: "!contains(github.event.head_commit.message, 'chore(release)')" |
| 13 | + runs-on: ubuntu-latest |
| 14 | + env: |
| 15 | + GH_TOKEN: ${{ secrets.ANGULAR_RU_BOT_PAT }} |
10 | 16 | steps: |
11 | | - - uses: actions/checkout@v4 |
| 17 | + - uses: taiga-family/ci/actions/setup/checkout@v1.65.1 |
12 | 18 | with: |
13 | | - fetch-depth: '0' |
14 | | - persist-credentials: false |
15 | | - |
16 | | - - name: Setup Node.js and Cache |
17 | | - uses: ./.github/actions/nodejs |
18 | | - |
19 | | - - name: Setup GIT username and NPM token |
20 | | - run: | |
21 | | - git config --global user.name "angular-ru-bot" |
22 | | - git config --global user.email "[email protected]" |
23 | | - git config remote.origin.url https://x-access-token:${{ secrets.ANGULAR_RU_BOT_PAT }}@github.com/$GITHUB_REPOSITORY |
24 | | - npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" |
25 | | - NPM_WHOAMI_OUTPUT=$(npm whoami) |
26 | | - echo "::debug::npm whoami: ${NPM_WHOAMI_OUTPUT}" |
27 | | -
|
28 | | - - name: Lerna version |
29 | | - if: always() |
30 | | - run: npx lerna version |
31 | | - |
32 | | - - name: Build libraries |
33 | | - run: npx nx run-many --target=build --parallel |
34 | | - |
35 | | - - name: Publish |
36 | | - if: always() |
37 | | - run: npx nx run-many --target=publish |
| 19 | + fetch-depth: 0 |
| 20 | + token: ${{ secrets.ANGULAR_RU_BOT_PAT }} |
| 21 | + - uses: taiga-family/ci/actions/setup/[email protected] |
| 22 | + - uses: taiga-family/ci/actions/setup/config/[email protected] |
| 23 | + with: |
| 24 | + token: ${{ secrets.ANGULAR_RU_BOT_PAT }} |
| 25 | + - uses: taiga-family/ci/actions/setup/config/[email protected] |
| 26 | + with: |
| 27 | + token: ${{ secrets.NPM_TOKEN }} |
38 | 28 |
|
39 | | -concurrency: |
40 | | - group: release-${{ github.head_ref }} |
41 | | - cancel-in-progress: true |
| 29 | + - run: npx release-it --increment --ci |
| 30 | + env: |
| 31 | + GITHUB_TOKEN: ${{ secrets.ANGULAR_RU_BOT_PAT }} |
0 commit comments