Skip to content

Commit b9fbb04

Browse files
committed
ci: re-assert repository metadata after build for provenance
dv-scripts build rewrites package.json repository.url to the upstream repo, failing Trusted Publishing provenance (E422). Re-set it on the built package.json right before publish.
1 parent 0406605 commit b9fbb04

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ jobs:
3737
- name: Build
3838
run: yarn build
3939

40+
# `dv-scripts build` resets package.json repository metadata to the upstream
41+
# (DylanVann) repo, which fails Trusted Publishing provenance validation
42+
# (provenance expects this repo). Re-assert it on the built package.json.
43+
- name: Restore repository metadata for provenance
44+
run: |
45+
npm pkg set repository.type=git
46+
npm pkg set repository.url=git+https://github.com/phantom/react-native-fast-image.git
47+
npm pkg set homepage=https://github.com/phantom/react-native-fast-image#readme
48+
4049
# No NODE_AUTH_TOKEN: npm exchanges the GitHub OIDC token via the Trusted Publisher.
4150
- name: Publish
4251
run: npm publish --access public

0 commit comments

Comments
 (0)