|
20 | 20 | - charts |
21 | 21 | - colours |
22 | 22 |
|
| 23 | +permissions: |
| 24 | + id-token: write |
| 25 | + contents: read |
| 26 | + |
23 | 27 | env: |
24 | 28 | DRY_RUN: ${{ github.event.inputs.dry-run == 'true' && '--dry-run' || '' }} |
25 | 29 |
|
26 | 30 | jobs: |
27 | 31 | publish-charts: |
28 | 32 | if: github.event.inputs.package == 'all' || github.event.inputs.package == 'charts' || github.event_name == 'release' |
29 | 33 | runs-on: ubuntu-latest |
30 | | - permissions: |
31 | | - contents: read |
32 | | - id-token: write |
33 | 34 | steps: |
34 | | - - name: Checkout repository |
35 | | - uses: actions/checkout@v5 |
36 | | - |
37 | | - - name: Setup Bun |
38 | | - uses: oven-sh/setup-bun@v2 |
39 | | - with: |
40 | | - bun-version: latest |
| 35 | + - uses: actions/checkout@v4 |
41 | 36 |
|
42 | | - - name: Setup Node.js |
43 | | - uses: actions/setup-node@v4 |
| 37 | + - uses: actions/setup-node@v4 |
44 | 38 | with: |
45 | 39 | node-version: "22" |
46 | 40 | registry-url: "https://registry.npmjs.org" |
47 | 41 |
|
48 | | - - name: Install dependencies |
49 | | - run: bun install --frozen-lockfile |
50 | | - |
51 | | - - name: Run tests |
52 | | - run: bun run test |
| 42 | + - run: npm ci |
53 | 43 |
|
54 | | - - name: Verify charts package can be packed |
55 | | - run: cd packages/charts && npm pack --dry-run |
| 44 | + - run: npm test |
| 45 | + working-directory: packages/charts |
56 | 46 |
|
57 | | - - name: Publish @buildcanada/charts |
58 | | - run: cd packages/charts && npm publish --access public --provenance ${{ env.DRY_RUN }} |
59 | | - env: |
60 | | - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 47 | + - run: npm publish --access public ${{ env.DRY_RUN }} |
| 48 | + working-directory: packages/charts |
61 | 49 |
|
62 | 50 | publish-colours: |
63 | 51 | if: github.event.inputs.package == 'all' || github.event.inputs.package == 'colours' || github.event_name == 'release' |
64 | 52 | runs-on: ubuntu-latest |
65 | | - permissions: |
66 | | - contents: read |
67 | | - id-token: write |
68 | 53 | steps: |
69 | | - - name: Checkout repository |
70 | | - uses: actions/checkout@v5 |
| 54 | + - uses: actions/checkout@v4 |
71 | 55 |
|
72 | | - - name: Setup Bun |
73 | | - uses: oven-sh/setup-bun@v2 |
74 | | - with: |
75 | | - bun-version: latest |
76 | | - |
77 | | - - name: Setup Node.js |
78 | | - uses: actions/setup-node@v4 |
| 56 | + - uses: actions/setup-node@v4 |
79 | 57 | with: |
80 | 58 | node-version: "22" |
81 | 59 | registry-url: "https://registry.npmjs.org" |
82 | 60 |
|
83 | | - - name: Install dependencies |
84 | | - run: bun install --frozen-lockfile |
85 | | - |
86 | | - - name: Build colours package |
87 | | - run: cd packages/colours && bun run build |
| 61 | + - run: npm ci |
88 | 62 |
|
89 | | - - name: Verify colours package can be packed |
90 | | - run: cd packages/colours && npm pack --dry-run |
| 63 | + - run: npm run build |
| 64 | + working-directory: packages/colours |
91 | 65 |
|
92 | | - - name: Publish @buildcanada/colours |
93 | | - run: cd packages/colours && npm publish --access public --provenance ${{ env.DRY_RUN }} |
94 | | - env: |
95 | | - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 66 | + - run: npm publish --access public ${{ env.DRY_RUN }} |
| 67 | + working-directory: packages/colours |
0 commit comments