|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: |
| 4 | + - master |
| 5 | + |
| 6 | +name: release-please |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: write |
| 10 | + pull-requests: write |
| 11 | + id-token: write |
| 12 | + |
| 13 | +jobs: |
| 14 | + release-please: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - uses: GoogleCloudPlatform/release-please-action@v4 |
| 18 | + id: release |
| 19 | + with: |
| 20 | + token: ${{secrets.GITHUB_TOKEN}} |
| 21 | + config-file: .github/release-please/config.json |
| 22 | + manifest-file: .github/release-please/manifest.json |
| 23 | + |
| 24 | + # Output which releases were created |
| 25 | + - run: echo "A release was created." |
| 26 | + if: ${{ steps.release.outputs.releases_created }} |
| 27 | + |
| 28 | + # Check to see if we need to do any releases and if so check out the repo |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + if: ${{ steps.release.outputs.releases_created }} |
| 31 | + |
| 32 | + # Node.js release |
| 33 | + - uses: actions/setup-node@v4 |
| 34 | + if: ${{ steps.release.outputs.releases_created }} |
| 35 | + with: |
| 36 | + node-version: lts/* |
| 37 | + registry-url: "https://registry.npmjs.org" |
| 38 | + |
| 39 | + #----------------------------------------------------------------------------- |
| 40 | + # eslint-plugin-autofix |
| 41 | + #----------------------------------------------------------------------------- |
| 42 | + |
| 43 | + - name: Publish eslint-plugin-autofix package to npm |
| 44 | + run: npm publish -w packages/autofix |
| 45 | + if: ${{ steps.release.outputs['packages/autofix--release_created'] }} |
| 46 | + env: |
| 47 | + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
| 48 | + |
| 49 | + #----------------------------------------------------------------------------- |
| 50 | + # eslint-plugin-no-autofix |
| 51 | + #----------------------------------------------------------------------------- |
| 52 | + |
| 53 | + - name: Publish eslint-plugin-no-autofix package to npm |
| 54 | + run: npm publish -w packages/no-autofix |
| 55 | + if: ${{ steps.release.outputs['packages/no-autofix--release_created'] }} |
| 56 | + env: |
| 57 | + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
| 58 | + |
| 59 | + #----------------------------------------------------------------------------- |
| 60 | + # eslint-plugin-web |
| 61 | + #----------------------------------------------------------------------------- |
| 62 | + |
| 63 | + - name: Publish eslint-plugin-web package to npm |
| 64 | + run: npm publish -w packages/web |
| 65 | + if: ${{ steps.release.outputs['packages/web--release_created'] }} |
| 66 | + env: |
| 67 | + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
0 commit comments