Skip to content

Commit e102191

Browse files
committed
use harden runner in ci, fix publish
1 parent 1ea195e commit e102191

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ jobs:
3232
node: [24]
3333
os: [ubuntu-latest]
3434
steps:
35+
- name: Harden the runner
36+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
37+
with:
38+
egress-policy: block
39+
allowed-endpoints: >
40+
api.github.com:443
41+
github.com:443
42+
release-assets.githubusercontent.com:443
43+
registry.npmjs.org:443
3544
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3645
with:
3746
persist-credentials: 'false'
@@ -91,6 +100,15 @@ jobs:
91100
vite: 'rolldown-vite'
92101
svelte: 'current'
93102
steps:
103+
- name: Harden the runner
104+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
105+
with:
106+
egress-policy: block
107+
allowed-endpoints: >
108+
api.github.com:443
109+
github.com:443
110+
release-assets.githubusercontent.com:443
111+
registry.npmjs.org:443
94112
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
95113
with:
96114
persist-credentials: 'false'

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
publish: pnpm exec changeset tag #only create git tag, publish to registry happens later
6464
env:
6565
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # needed for some github api calls changesets makes
66+
6667
publish:
6768
needs: changesets
6869
if: needs.changesets.outputs.published == 'true'
@@ -103,6 +104,7 @@ jobs:
103104
TAG=latest
104105
fi
105106
107+
GIT_STATUS=$(git status --porcelain=v1)
106108
if [[ "$GIT_STATUS" != "" ]]; then
107109
echo "dirty git state, aborting publish"
108110
echo "$GIT_STATUS";

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"lint": "pnpm check:lint --fix",
1818
"format": "pnpm check:format --write",
1919
"fixup": "run-s lint format",
20-
"release": "pnpm changeset publish",
2120
"prepare": "husky",
2221
"playwright": "playwright-core",
2322
"generate:types": "pnpm --filter \"./packages/*\" --parallel generate:types",

0 commit comments

Comments
 (0)