Skip to content

Commit 9fab130

Browse files
authored
chore(actions): sync actions in v3 branch to changes in main (#967)
1 parent b3edb77 commit 9fab130

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
matrix:
3232
# pseudo-matrix for convenience, NEVER use more than a single combination
33-
node: [18]
33+
node: [20]
3434
os: [ubuntu-latest]
3535
steps:
3636
- uses: actions/checkout@v4
@@ -102,7 +102,7 @@ jobs:
102102
cache: 'pnpm'
103103
cache-dependency-path: '**/pnpm-lock.yaml'
104104
- name: install
105-
run: pnpm install --frozen-lockfile --prefer-offline --ignore-scripts
105+
run: pnpm install --frozen-lockfile --ignore-scripts
106106
# - name: use svelte5
107107
# if: (${{matrix.svelte == 5 }})
108108
# run: pnpm i -Dw svelte@^5.0.0-next.1 && pnpm install

.github/workflows/release.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
release:
1111
permissions:
1212
contents: write # to create release (changesets/action)
13+
id-token: write # OpenID Connect token needed for provenance
1314
pull-requests: write # to create pull request (changesets/action)
1415
# prevents this action from running on forks
1516
if: github.repository == 'sveltejs/vite-plugin-svelte'
@@ -18,7 +19,7 @@ jobs:
1819
strategy:
1920
matrix:
2021
# pseudo-matrix for convenience, NEVER use more than a single combination
21-
node: [18]
22+
node: [20]
2223
os: [ubuntu-latest]
2324
steps:
2425
- name: checkout
@@ -55,16 +56,17 @@ jobs:
5556
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5657
- name: Create Release Pull Request or Publish to npm
5758
id: changesets
58-
uses: changesets/action@v1
59+
# pinned for security, always review third party action code before updating
60+
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 #v1.4.7
5961
with:
6062
# This expects you to have a script called release which does a build for your packages and calls changeset publish
6163
publish: pnpm release
6264
env:
6365
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6466
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
65-
66-
# TODO alert discord
67-
# - name: Send a Slack notification if a publish happens
68-
# if: steps.changesets.outputs.published == 'true'
69-
# # You can do something when a publish happens.
70-
# run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"
67+
NPM_CONFIG_PROVENANCE: true
68+
- name: Remove .npmrc
69+
if: always()
70+
run: |
71+
echo "#deleted" > "$HOME/.npmrc"
72+
rm -f "$HOME/.npmrc"

0 commit comments

Comments
 (0)