Skip to content

Commit db1659a

Browse files
committed
ci: fix delivery pipeline
1 parent 932c4d7 commit db1659a

File tree

15 files changed

+46
-91
lines changed

15 files changed

+46
-91
lines changed

.changeset/deep-hairs-sniff.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@adbayb/stack": minor
3+
---
4+
5+
Update template to allow trusted publishing for npm packages following the long-lived tokens npm deprecation.

.github/workflows/continuous_delivery.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,22 @@ jobs:
1616
runs-on: ubuntu-latest
1717
permissions:
1818
contents: write
19+
id-token: write
1920
pull-requests: write
2021
steps:
21-
- uses: actions/checkout@v5
22-
- uses: pnpm/action-setup@v4
22+
- uses: actions/checkout@v6
23+
- uses: pnpm/action-setup@v5
2324
- uses: actions/setup-node@v6
2425
with:
25-
node-version-file: ".nvmrc"
2626
cache: pnpm
27-
- name: Setup .npmrc
28-
run: |
29-
cat << EOF > "$HOME/.npmrc"
30-
//registry.npmjs.org/:_authToken=$NPM_TOKEN
31-
EOF
32-
env:
33-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
node-version-file: ".nvmrc"
3428
- name: Install dependencies
3529
run: pnpm install --frozen-lockfile
3630
- name: Publish pre-release version(s)
3731
if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
3832
run: |
39-
pnpm --filter="!./(applications|examples|tools)/*" --recursive exec pnpm version "$(pnpm show ./ version)-next-${GITHUB_SHA::7}"
40-
pnpm --filter="!./(applications|examples|tools)/*" --recursive exec pnpm publish --tag next --no-git-checks
33+
pnpm --filter="!." --filter="!./(applications|examples|tools)/*" --recursive exec pnpm version "$(pnpm show ./ version)-next-${GITHUB_SHA::7}" --no-git-tag-version
34+
pnpm --filter="!." --filter="!./(applications|examples|tools)/*" --recursive exec pnpm publish --tag next --no-git-checks
4135
- name: Create release pull request
4236
if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
4337
uses: changesets/action@v1

.github/workflows/conventional_commit.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ jobs:
2929
requireScope: false
3030
subjectPattern: ^(?![A-Z]).+$
3131
subjectPatternError: The subject must start with a lowercase character
32-
# Create a sticky comment to display the detailed error
33-
- uses: marocchino/sticky-pull-request-comment@v2
32+
- uses: marocchino/sticky-pull-request-comment@v3
3433
if: always() && (steps.check_pr_rule.outputs.error_message != null)
3534
with:
3635
header: check_pr_comment

.github/workflows/dependency_changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.actor == 'renovate[bot]'
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v5
15+
uses: actions/checkout@v6
1616
with:
1717
fetch-depth: 2
1818
ref: ${{ github.head_ref }}

.github/workflows/workflow.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,12 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout the code
12-
uses: actions/checkout@v5
13-
- uses: pnpm/action-setup@v4
12+
uses: actions/checkout@v6
13+
- uses: pnpm/action-setup@v5
1414
- uses: actions/setup-node@v6
1515
with:
16-
node-version-file: ".nvmrc"
1716
cache: pnpm
18-
- name: Setup cache
19-
id: cache
20-
uses: actions/cache@v4
21-
with:
22-
path: |
23-
./node_modules
24-
./turbo
25-
key: ${{ runner.os }}-cache-${{ github.sha }}
26-
restore-keys: |
27-
${{ runner.os }}-cache-
17+
node-version-file: ".nvmrc"
2818
- name: Install dependencies
2919
run: pnpm install --frozen-lockfile
3020
- name: Build

.npmrc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
11
save-exact=true
2-
public-hoist-pattern[]=*changesets*
3-
public-hoist-pattern[]=*commitlint*
4-
public-hoist-pattern[]=*eslint*
5-
public-hoist-pattern[]=*prettier*
6-
public-hoist-pattern[]=*turbo*
7-
public-hoist-pattern[]=*typescript*
8-
public-hoist-pattern[]=*types*

pnpm-workspace.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
packages:
22
- "stack"
33
- "stack/create"
4+
publicHoistPattern:
5+
- "*changesets*"
6+
- "*commitlint*"
7+
- "*eslint*"
8+
- "*prettier*"
9+
- "*turbo*"
10+
- "*typescript*"
11+
- "*types*"

stack/templates/multi-projects/.github/workflows/continuous_delivery.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,22 @@ jobs:
1616
runs-on: ubuntu-latest
1717
permissions:
1818
contents: write
19+
id-token: write
1920
pull-requests: write
2021
steps:
21-
- uses: actions/checkout@v5
22-
- uses: pnpm/action-setup@v4
22+
- uses: actions/checkout@v6
23+
- uses: pnpm/action-setup@v5
2324
- uses: actions/setup-node@v6
2425
with:
25-
node-version-file: ".nvmrc"
2626
cache: pnpm
27-
- name: Setup .npmrc
28-
run: |
29-
cat << EOF > "$HOME/.npmrc"
30-
//registry.npmjs.org/:_authToken=$NPM_TOKEN
31-
EOF
32-
env:
33-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
node-version-file: ".nvmrc"
3428
- name: Install dependencies
3529
run: pnpm install --frozen-lockfile
3630
- name: Publish pre-release version(s)
3731
if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
3832
run: |
39-
pnpm --filter="!./(applications|examples|tools)/*" --recursive exec pnpm version "$(pnpm show ./ version)-next-${GITHUB_SHA::7}"
40-
pnpm --filter="!./(applications|examples|tools)/*" --recursive exec pnpm publish --tag next --no-git-checks
33+
pnpm --filter="!." --filter="!./(applications|examples|tools)/*" --recursive exec pnpm version "$(pnpm show ./ version)-next-${GITHUB_SHA::7}" --no-git-tag-version
34+
pnpm --filter="!." --filter="!./(applications|examples|tools)/*" --recursive exec pnpm publish --tag next --no-git-checks
4135
- name: Create release pull request
4236
if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
4337
uses: changesets/action@v1

stack/templates/multi-projects/.github/workflows/conventional_commit.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ jobs:
2929
requireScope: false
3030
subjectPattern: ^(?![A-Z]).+$
3131
subjectPatternError: The subject must start with a lowercase character
32-
# Create a sticky comment to display the detailed error
33-
- uses: marocchino/sticky-pull-request-comment@v2
32+
- uses: marocchino/sticky-pull-request-comment@v3
3433
if: always() && (steps.check_pr_rule.outputs.error_message != null)
3534
with:
3635
header: check_pr_comment

stack/templates/multi-projects/.github/workflows/dependency_changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.actor == 'renovate[bot]'
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v5
15+
uses: actions/checkout@v6
1616
with:
1717
fetch-depth: 2
1818
ref: ${{ github.head_ref }}

0 commit comments

Comments
 (0)