Skip to content

Commit

Permalink
Merge pull request #703 from magiclabs/PDEEXP-25-npm-package-provenance
Browse files Browse the repository at this point in the history
Add npm provenance
  • Loading branch information
Ethella authored Feb 2, 2024
2 parents f0b725e + 871431e commit f72f5fc
Show file tree
Hide file tree
Showing 14 changed files with 2,502 additions and 2,837 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ on:
types: [checks_requested]

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.ARI_ADMIN_PAT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true

jobs:
build:
Expand All @@ -23,7 +24,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'yarn'

- name: Install dependencies
Expand All @@ -46,6 +47,9 @@ jobs:
create_canary:
runs-on: ubuntu-20.04
name: Canary
permissions:
contents: read
id-token: write
needs: build
steps:
- uses: actions/checkout@v3
Expand All @@ -55,7 +59,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: 'yarn'

- name: Install dependencies
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
GITHUB_TOKEN: ${{ secrets.ARI_ADMIN_PAT_TOKEN }}
GH_TOKEN: ${{ secrets.ARI_ADMIN_PAT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true

jobs:
build:
Expand All @@ -18,14 +19,14 @@ jobs:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ARI_ADMIN_PAT_TOKEN }}

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'yarn'

- name: Install dependencies
Expand Down Expand Up @@ -62,6 +63,9 @@ jobs:
publish:
runs-on: ubuntu-20.04
name: Publish
permissions:
contents: read
id-token: write
needs: build
environment: production
steps:
Expand All @@ -75,7 +79,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: 'yarn'

- name: Install dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
runs-on: ubuntu-20.04
name: Run linter and package audit
container:
image: node:16-slim
image: node:20-slim
steps:
- uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: 'yarn'
- run: |
yarn -v
Expand All @@ -40,14 +40,14 @@ jobs:
runs-on: ubuntu-20.04
name: Run tests
container:
image: node:16-slim
image: node:20-slim
steps:
- uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
cache: 'yarn'
- run: |
yarn -v
Expand Down
5 changes: 0 additions & 5 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
"publish": {
"verifyAccess": false
}
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint": "$INIT_CWD/scripts/bin/lint.ts",
"test": "$INIT_CWD/scripts/bin/test.ts",
"scaffold": "$INIT_CWD/scripts/bin/scaffold/run.tsx",
"postinstall": "husky install && lerna link"
"postinstall": "husky install"
},
"devDependencies": {
"@ikscodes/browser-env": "~0.3.1",
Expand Down Expand Up @@ -50,7 +50,7 @@
"inquirer": "^8.1.2",
"is-ci": "^3.0.0",
"jest": "^27.0.6",
"lerna": "^3.21.0",
"lerna": "8.0.2",
"lint-staged": "^10.0.7",
"lodash": "^4.17.21",
"meow": "9.0.0",
Expand Down
9 changes: 8 additions & 1 deletion packages/@magic-ext/webauthn/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
<!-- force publish -->
# Magic Extension WebAuthn blockchain

## Installation
```bash
npm i magic-sdk @magic-ext/webauthn
```

###
1 change: 1 addition & 0 deletions packages/@magic-sdk/commons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ This package is an internal dependency of the Magic JavaScript SDK ecosystem. If
- Web: [`magic-sdk`](https://github.com/magiclabs/magic-js/tree/master/packages/magic-sdk)
- Bare React Native: [`@magic-sdk/react-native-bare`](https://github.com/magiclabs/magic-js/tree/master/packages/@magic-sdk/react-native-bare)
- Expo React Native: [`@magic-sdk/react-native-expo`](https://github.com/magiclabs/magic-js/tree/master/packages/@magic-sdk/react-native-expo)

1 change: 1 addition & 0 deletions packages/@magic-sdk/pnp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ Next, create a page containing the script tag below to handle the authentication
Voila!

_(Really, though, that's it!)_

1 change: 1 addition & 0 deletions packages/@magic-sdk/provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ This package is an internal dependency of the Magic JavaScript SDK ecosystem. If
- Web: [`magic-sdk`](https://github.com/magiclabs/magic-js/tree/master/packages/magic-sdk)
- Bare React Native: [`@magic-sdk/react-native-bare`](https://github.com/magiclabs/magic-js/tree/master/packages/@magic-sdk/react-native-bare)
- Expo React Native: [`@magic-sdk/react-native-expo`](https://github.com/magiclabs/magic-js/tree/master/packages/@magic-sdk/react-native-expo)

2 changes: 1 addition & 1 deletion packages/@magic-sdk/react-native-bare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ export default function App() {
</SafeAreaProvider>
</>
}
```
```
2 changes: 1 addition & 1 deletion packages/@magic-sdk/react-native-expo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ export default function App() {
</SafeAreaProvider>
</>
}
```
```
1 change: 1 addition & 0 deletions packages/@magic-sdk/types/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ This package is an internal dependency of the Magic JavaScript SDK ecosystem. If
- Web: [`magic-sdk`](https://github.com/magiclabs/magic-js/tree/master/packages/magic-sdk)
- Bare React Native: [`@magic-sdk/react-native-bare`](https://github.com/magiclabs/magic-js/tree/master/packages/@magic-sdk/react-native-bare)
- Expo React Native: [`@magic-sdk/react-native-expo`](https://github.com/magiclabs/magic-js/tree/master/packages/@magic-sdk/react-native-expo)

1 change: 1 addition & 0 deletions packages/magic-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ Test specific files
```bash
yarn test /test/**/constructor.spec.ts
```

Loading

0 comments on commit f72f5fc

Please sign in to comment.