|
1 | | -name: NPM Release and Publish |
| 1 | +name: Publish to NPM |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - "main" |
7 | | - |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - 'main' |
| 7 | + |
8 | 8 | permissions: |
9 | | - id-token: write # Required for OIDC / NPM Trusted Publishing (https://repos.openssf.org/trusted-publishers-for-all-package-repositories) |
10 | | - contents: write |
| 9 | + id-token: write # Required for OIDC / NPM Trusted Publishing (https://repos.openssf.org/trusted-publishers-for-all-package-repositories) |
| 10 | + contents: write |
11 | 11 |
|
12 | 12 | jobs: |
13 | | - quality-bump-and-publish: |
14 | | - runs-on: ubuntu-latest |
15 | | - if: ${{ !contains(github.event.head_commit.message, '[ci-skip]') }} |
16 | | - steps: |
17 | | - - uses: actions/checkout@v4 |
18 | | - - uses: actions/setup-node@v4 |
19 | | - with: |
20 | | - node-version: 22 |
21 | | - registry-url: 'https://registry.npmjs.org' |
22 | | - - name: Update npm |
23 | | - run: npm install -g npm@latest # NPM Trusted Publishing requires npm 11.5.1 or later |
24 | | - - name: Configure git |
25 | | - run: | |
26 | | - git config user.name "GitHub Actions Bot" |
27 | | - git config user.email "github-actions-bot@users.noreply.github.com" |
28 | | - - name: Install npm dependencies |
29 | | - run: npm ci |
30 | | - env: |
31 | | - HUSKY: 0 |
32 | | - - name: Run quality checks |
33 | | - run: npm run quality |
34 | | - - name: Build project |
35 | | - run: npm run build |
36 | | - - name: Run standard-version to bump version |
37 | | - run: npm run release |
38 | | - - name: Push version bump to main |
39 | | - uses: ad-m/github-push-action@master |
40 | | - with: |
41 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
42 | | - branch: main |
43 | | - tags: true |
44 | | - force: true |
45 | | - - name: Bundle tarball |
46 | | - run: npm run package |
47 | | - - name: Publish to npm |
48 | | - run: npm publish |
| 13 | + quality-bump-and-publish: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + if: ${{ !contains(github.event.head_commit.message, '[ci-skip]') }} |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v6 |
| 18 | + - uses: actions/setup-node@v6 |
| 19 | + with: |
| 20 | + node-version: 24 |
| 21 | + registry-url: 'https://registry.npmjs.org' |
| 22 | + - name: Update npm |
| 23 | + run: npm install -g npm@latest # NPM Trusted Publishing requires npm 11.5.1 or later |
| 24 | + - name: Configure git |
| 25 | + run: | |
| 26 | + git config user.name "GitHub Actions Bot" |
| 27 | + git config user.email "github-actions-bot@users.noreply.github.com" |
| 28 | + - name: Install npm dependencies |
| 29 | + run: npm ci |
| 30 | + env: |
| 31 | + HUSKY: 0 |
| 32 | + - name: Run quality checks |
| 33 | + run: npm run quality |
| 34 | + - name: Build project |
| 35 | + run: npm run build |
| 36 | + - name: Run standard-version to bump version |
| 37 | + run: npm run release |
| 38 | + - name: Push version bump to main |
| 39 | + uses: ad-m/github-push-action@master |
| 40 | + with: |
| 41 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 42 | + branch: main |
| 43 | + tags: true |
| 44 | + force: true |
| 45 | + - name: Bundle tarball |
| 46 | + run: npm run package |
| 47 | + - name: Publish to npm |
| 48 | + run: npm publish |
0 commit comments