|
6 | 6 | - main |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - publish: |
10 | | - runs-on: ubuntu-latest |
11 | | - permissions: write-all |
12 | | - env: |
13 | | - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
14 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
15 | | - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
16 | | - |
17 | | - steps: |
18 | | - - uses: actions/checkout@v6 |
19 | | - with: |
20 | | - persist-credentials: false |
21 | | - |
22 | | - - name: Enable Corepack |
23 | | - run: corepack enable |
24 | | - |
25 | | - - uses: actions/setup-node@v6 |
26 | | - with: |
27 | | - node-version: 24 |
28 | | - cache: yarn |
29 | | - registry-url: https://registry.npmjs.org |
30 | | - |
31 | | - ## --- YARN CACHE --- ## |
32 | | - - name: Check for cached dependencies |
33 | | - continue-on-error: true |
34 | | - id: cache-dependencies |
35 | | - uses: actions/cache@v5 |
36 | | - with: |
37 | | - path: | |
38 | | - .cache/yarn |
39 | | - node_modules |
40 | | - key: ubuntu-latest-node24-${{ hashFiles('yarn.lock') }} |
41 | | - |
42 | | - ## --- INSTALL --- ## |
43 | | - # If statement isn't needed here b/c yarn will leverage the cache if it exists |
44 | | - - name: Install dependencies |
45 | | - shell: bash |
46 | | - run: yarn install --immutable |
47 | | - |
48 | | - - name: Semantic release |
49 | | - uses: cycjimmy/semantic-release-action@v5 |
50 | | - env: |
51 | | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
52 | | - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
53 | | - GIT_AUTHOR_NAME: Cassondra Roberts |
54 | | - GIT_AUTHOR_EMAIL: castastrophe@users.noreply.github.com |
55 | | - GIT_COMMITTER_NAME: Cassondra Roberts |
56 | | - GIT_COMMITTER_EMAIL: castastrophe@users.noreply.github.com |
| 9 | + publish: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + permissions: |
| 12 | + id-token: write # Required for OIDC |
| 13 | + contents: write # to create release tags (cycjimmy/semantic-release-action) |
| 14 | + issues: write # to post release that resolves an issue |
| 15 | + env: |
| 16 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 17 | + |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + node-version: [24] |
| 21 | + |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v6 |
| 24 | + with: |
| 25 | + persist-credentials: false |
| 26 | + |
| 27 | + - name: Enable Corepack |
| 28 | + run: corepack enable |
| 29 | + |
| 30 | + - name: Setup Node.js |
| 31 | + uses: actions/setup-node@v6 |
| 32 | + with: |
| 33 | + node-version: ${{ matrix.node-version }} |
| 34 | + cache: yarn |
| 35 | + registry-url: "https://registry.npmjs.org" |
| 36 | + |
| 37 | + ## --- YARN CACHE --- ## |
| 38 | + - name: Check for cached dependencies |
| 39 | + continue-on-error: true |
| 40 | + id: cache-dependencies |
| 41 | + uses: actions/cache@v5 |
| 42 | + with: |
| 43 | + path: | |
| 44 | + .cache/yarn |
| 45 | + node_modules |
| 46 | + key: ubuntu-latest-node${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }} |
| 47 | + |
| 48 | + |
| 49 | + - name: Install dependencies |
| 50 | + shell: bash |
| 51 | + run: yarn install --frozen-lockfile |
| 52 | + |
| 53 | + - name: Semantic release |
| 54 | + uses: cycjimmy/semantic-release-action@v5 |
| 55 | + with: |
| 56 | + semantic_version: 25 |
| 57 | + env: |
| 58 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 59 | + GIT_AUTHOR_NAME: Cassondra Roberts |
| 60 | + GIT_AUTHOR_EMAIL: castastrophe@users.noreply.github.com |
| 61 | + GIT_COMMITTER_NAME: Cassondra Roberts |
| 62 | + GIT_COMMITTER_EMAIL: castastrophe@users.noreply.github.com |
0 commit comments