Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generating provenance statements #6896

Merged
merged 4 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/release-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
type: string
description: "Commit SHA"

permissions:
# To publish packages with provenance
id-token: write

jobs:
get-runner-labels:
name: Get Runner Labels
Expand Down Expand Up @@ -83,3 +87,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# To publish packages with provenance
NPM_CONFIG_PROVENANCE: true
6 changes: 6 additions & 0 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
# 08:00 AM Beijing Time. Except Tuesday, which is for full release
- cron: "0 0 * * 0,1,3,4,5,6"

permissions:
# To publish packages with provenance
id-token: write

jobs:
get-runner-labels:
name: Get Runner Labels
Expand Down Expand Up @@ -83,6 +87,8 @@ jobs:
REPOSITORY: ${{ github.repository }}
REF: ${{ github.ref }}
ONLY_RELEASE_TAG: true
# To publish packages with provenance
NPM_CONFIG_PROVENANCE: true
outputs:
version: ${{ steps.publish.outputs.version }}

Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ on:
description: "push tags to github"
required: true
default: true

permissions:
# To publish packages with provenance
id-token: write

jobs:
get-runner-labels:
name: Get Runner Labels
Expand Down Expand Up @@ -100,6 +105,9 @@ jobs:
REPOSITORY: ${{ github.repository }}
REF: ${{ github.ref }}
ONLY_RELEASE_TAG: true
# To publish packages with provenance
NPM_CONFIG_PROVENANCE: true

- name: Release Nightly(After Full)
run: |
./x version snapshot
Expand All @@ -110,3 +118,5 @@ jobs:
REPOSITORY: ${{ github.repository }}
REF: ${{ github.ref }}
ONLY_RELEASE_TAG: true
# To publish packages with provenance
NPM_CONFIG_PROVENANCE: true
3 changes: 2 additions & 1 deletion crates/node_binding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"main": "binding.js",
"types": "binding.d.ts",
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"files": [
"binding.js",
Expand Down
3 changes: 2 additions & 1 deletion npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"url": "https://github.com/web-infra-dev/rspack"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"files": [
"rspack.darwin-arm64.node"
Expand Down
3 changes: 2 additions & 1 deletion npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"url": "https://github.com/web-infra-dev/rspack"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"files": [
"rspack.darwin-x64.node"
Expand Down
3 changes: 2 additions & 1 deletion npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"url": "https://github.com/web-infra-dev/rspack"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"files": [
"rspack.linux-x64-gnu.node"
Expand Down
3 changes: 2 additions & 1 deletion npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"url": "https://github.com/web-infra-dev/rspack"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"files": [
"rspack.win32-x64-msvc.node"
Expand Down
4 changes: 4 additions & 0 deletions packages/create-rspack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"bin": {
"create-rspack": "index.js"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"homepage": "https://rspack.dev",
"bugs": "https://github.com/web-infra-dev/rspack/issues",
"repository": {
Expand Down
4 changes: 4 additions & 0 deletions packages/rspack-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"version": "0.7.4",
"license": "MIT",
"description": "CLI for rspack",
"publishConfig": {
"access": "public",
"provenance": true
},
"bin": {
"rspack": "./bin/rspack"
},
Expand Down
4 changes: 4 additions & 0 deletions packages/rspack-dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"description": "Development server for rspack",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"publishConfig": {
"access": "public",
"provenance": true
},
"exports": {
".": {
"default": "./dist/index.js"
Expand Down
3 changes: 2 additions & 1 deletion packages/rspack-plugin-minify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"directory": "packages/rspack-plugin-minify"
},
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"dependencies": {
"esbuild": "0.16.3",
Expand Down
3 changes: 2 additions & 1 deletion packages/rspack-plugin-preact-refresh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"dist"
],
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"homepage": "https://rspack.dev",
"bugs": "https://github.com/web-infra-dev/rspack/issues",
Expand Down
3 changes: 2 additions & 1 deletion packages/rspack-plugin-react-refresh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"dist"
],
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"homepage": "https://rspack.dev",
"bugs": "https://github.com/web-infra-dev/rspack/issues",
Expand Down
3 changes: 2 additions & 1 deletion packages/rspack-test-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"jest.d.ts"
],
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"homepage": "https://rspack.dev",
"bugs": "https://github.com/web-infra-dev/rspack/issues",
Expand Down
4 changes: 4 additions & 0 deletions packages/rspack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"description": "The fast Rust-based web bundler with webpack-compatible API",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"publishConfig": {
"access": "public",
"provenance": true
},
"exports": {
".": {
"default": "./dist/index.js"
Expand Down
Loading