Skip to content

Commit 149867b

Browse files
authored
chore: Use new NPM trusted publishing (#728)
1 parent 344ffb7 commit 149867b

File tree

5 files changed

+27
-101
lines changed

5 files changed

+27
-101
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,44 +13,8 @@ updates:
1313
- package-ecosystem: "github-actions"
1414
# Workflow files stored in the
1515
# default location of `.github/workflows`
16-
directory: "/"
16+
directories:
17+
- "/"
18+
- "/.github/actions/*"
1719
schedule:
1820
interval: "daily"
19-
20-
- package-ecosystem: "npm" # See documentation for possible values
21-
directory: "/" # Location of package manifests
22-
target-branch: "cspell4"
23-
schedule:
24-
interval: "weekly"
25-
26-
- package-ecosystem: "github-actions"
27-
# Workflow files stored in the
28-
# default location of `.github/workflows`
29-
directory: "/"
30-
target-branch: "cspell4"
31-
schedule:
32-
interval: "daily"
33-
34-
# Automatically added by streetsidesoftware/public/update-dependabot-github-actions
35-
- package-ecosystem: github-actions
36-
directory: /.github/actions/setup
37-
schedule:
38-
interval: daily
39-
commit-message:
40-
prefix: ci
41-
42-
# Automatically added by streetsidesoftware/public/update-dependabot-github-actions
43-
- package-ecosystem: github-actions
44-
directory: /.github/actions/pr
45-
schedule:
46-
interval: daily
47-
commit-message:
48-
prefix: ci
49-
50-
# Automatically added by streetsidesoftware/public/update-dependabot-github-actions
51-
- package-ecosystem: github-actions
52-
directory: /.github/actions/github-app-token
53-
schedule:
54-
interval: daily
55-
commit-message:
56-
prefix: ci

.github/workflows/publish-docker-image.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,17 @@ on:
1515
- "no"
1616
default: "no"
1717
required: false
18+
ref:
19+
description: "Reference / tag to publish"
20+
required: false
21+
type: string
22+
1823
workflow_call:
24+
inputs:
25+
ref:
26+
description: "Reference / tag to publish"
27+
required: true
28+
type: string
1929

2030
env:
2131
REGISTRY: ghcr.io
@@ -35,6 +45,8 @@ jobs:
3545
steps:
3646
- name: Checkout repository
3747
uses: actions/checkout@v5
48+
with:
49+
ref: ${{ github.event.inputs.ref || github.ref }}
3850

3951
- name: CSpell Version
4052
run: |

.github/workflows/release-please.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ on:
99
permissions:
1010
contents: write
1111
pull-requests: write
12-
id-token: write
1312

1413
jobs:
1514
release-please:
1615
runs-on: ubuntu-latest
1716
outputs:
1817
release_created: ${{ steps.release.outputs.release_created }}
18+
tag_name: ${{ steps.release.outputs.tag_name }}
1919
steps:
2020
- uses: googleapis/release-please-action@v4
2121
id: release
@@ -30,19 +30,24 @@ jobs:
3030
needs:
3131
- release-please
3232
if: ${{ needs.release-please.outputs.release_created }}
33+
permissions:
34+
contents: read
35+
id-token: write
3336
steps:
3437
# The logic below handles the npm publication:
3538
- uses: actions/checkout@v5
39+
with:
40+
ref: ${{ needs.release-please.outputs.tag_name }}
3641
- name: Setup
3742
uses: ./.github/actions/setup
3843
with:
39-
node-version: ${{ matrix.node-version }}
44+
node-version: 22.x
4045

4146
- run: npm ci
4247

4348
- run: npm publish
4449
env:
45-
NODE_AUTH_TOKEN: ${{secrets.PUBLISH_NPM}}
50+
NPM_CONFIG_PROVENANCE: true
4651

4752
publish-docker:
4853
permissions:
@@ -51,4 +56,6 @@ jobs:
5156
needs:
5257
- release-please
5358
uses: ./.github/workflows/publish-docker-image.yml
59+
with:
60+
ref: ${{ needs.release-please.outputs.tag_name }}
5461
if: ${{ needs.release-please.outputs.release_created }}

.github/workflows/update-dependabot.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.prettierrc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
singleQuote: false
2+
semi: true

0 commit comments

Comments
 (0)