|
3 | 3 | branches: |
4 | 4 | - protobufjs-v7.x |
5 | 5 | name: release-please |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: write |
| 9 | + issues: write |
| 10 | + pull-requests: write |
| 11 | + id-token: write |
| 12 | + |
6 | 13 | jobs: |
7 | 14 | release-please: |
8 | 15 | runs-on: ubuntu-latest |
9 | 16 | steps: |
10 | 17 | - uses: googleapis/release-please-action@v3 |
| 18 | + id: release |
11 | 19 | with: |
12 | 20 | command: manifest |
13 | 21 | package-name: release-please-action |
14 | 22 | default-branch: ${{ github.ref_name }} |
| 23 | + |
| 24 | + - uses: actions/checkout@v6 |
| 25 | + if: ${{ steps.release.outputs.releases_created == 'true' }} |
| 26 | + |
| 27 | + - uses: actions/setup-node@v6 |
| 28 | + if: ${{ steps.release.outputs.releases_created == 'true' }} |
| 29 | + with: |
| 30 | + node-version: 24 |
| 31 | + registry-url: https://registry.npmjs.org/ |
| 32 | + |
| 33 | + - name: Use npm with trusted publishing support |
| 34 | + if: ${{ steps.release.outputs.releases_created == 'true' }} |
| 35 | + run: npm install -g npm@^11.5.1 |
| 36 | + |
| 37 | + - name: Install dependencies |
| 38 | + if: ${{ steps.release.outputs.releases_created == 'true' }} |
| 39 | + run: npm install --ignore-scripts |
| 40 | + |
| 41 | + - name: Install CLI dependencies |
| 42 | + if: ${{ steps.release.outputs.releases_created == 'true' }} |
| 43 | + run: npm --prefix cli install --ignore-scripts |
| 44 | + |
| 45 | + - name: Build |
| 46 | + if: ${{ steps.release.outputs.releases_created == 'true' }} |
| 47 | + run: npm run build |
| 48 | + |
| 49 | + - name: Test |
| 50 | + if: ${{ steps.release.outputs.releases_created == 'true' }} |
| 51 | + run: npm test |
| 52 | + |
| 53 | + - name: Publish @protobufjs/aspromise |
| 54 | + if: ${{ steps.release.outputs['lib/aspromise--release_created'] == 'true' }} |
| 55 | + working-directory: lib/aspromise |
| 56 | + run: npm publish --ignore-scripts --access public |
| 57 | + |
| 58 | + - name: Publish @protobufjs/base64 |
| 59 | + if: ${{ steps.release.outputs['lib/base64--release_created'] == 'true' }} |
| 60 | + working-directory: lib/base64 |
| 61 | + run: npm publish --ignore-scripts --access public |
| 62 | + |
| 63 | + - name: Publish @protobufjs/codegen |
| 64 | + if: ${{ steps.release.outputs['lib/codegen--release_created'] == 'true' }} |
| 65 | + working-directory: lib/codegen |
| 66 | + run: npm publish --ignore-scripts --access public |
| 67 | + |
| 68 | + - name: Publish @protobufjs/eventemitter |
| 69 | + if: ${{ steps.release.outputs['lib/eventemitter--release_created'] == 'true' }} |
| 70 | + working-directory: lib/eventemitter |
| 71 | + run: npm publish --ignore-scripts --access public |
| 72 | + |
| 73 | + - name: Publish @protobufjs/fetch |
| 74 | + if: ${{ steps.release.outputs['lib/fetch--release_created'] == 'true' }} |
| 75 | + working-directory: lib/fetch |
| 76 | + run: npm publish --ignore-scripts --access public |
| 77 | + |
| 78 | + - name: Publish @protobufjs/float |
| 79 | + if: ${{ steps.release.outputs['lib/float--release_created'] == 'true' }} |
| 80 | + working-directory: lib/float |
| 81 | + run: npm publish --ignore-scripts --access public |
| 82 | + |
| 83 | + - name: Publish @protobufjs/inquire |
| 84 | + if: ${{ steps.release.outputs['lib/inquire--release_created'] == 'true' }} |
| 85 | + working-directory: lib/inquire |
| 86 | + run: npm publish --ignore-scripts --access public |
| 87 | + |
| 88 | + - name: Publish @protobufjs/path |
| 89 | + if: ${{ steps.release.outputs['lib/path--release_created'] == 'true' }} |
| 90 | + working-directory: lib/path |
| 91 | + run: npm publish --ignore-scripts --access public |
| 92 | + |
| 93 | + - name: Publish @protobufjs/pool |
| 94 | + if: ${{ steps.release.outputs['lib/pool--release_created'] == 'true' }} |
| 95 | + working-directory: lib/pool |
| 96 | + run: npm publish --ignore-scripts --access public |
| 97 | + |
| 98 | + - name: Publish @protobufjs/utf8 |
| 99 | + if: ${{ steps.release.outputs['lib/utf8--release_created'] == 'true' }} |
| 100 | + working-directory: lib/utf8 |
| 101 | + run: npm publish --ignore-scripts --access public |
| 102 | + |
| 103 | + - name: Publish protobufjs |
| 104 | + if: ${{ steps.release.outputs.release_created == 'true' }} |
| 105 | + run: npm publish --ignore-scripts --tag latest-7 |
| 106 | + |
| 107 | + - name: Publish protobufjs-cli |
| 108 | + if: ${{ steps.release.outputs['cli--release_created'] == 'true' }} |
| 109 | + working-directory: cli |
| 110 | + run: npm publish --ignore-scripts --tag latest-1 |
0 commit comments