Skip to content

Commit 5645dd9

Browse files
authored
Merge pull request #108 from lidofinance/feature/si-1276-investigate-provenance-signature
[build]fix provenance config
2 parents d6efe9e + 7a749be commit 5645dd9

File tree

4 files changed

+1267
-1059
lines changed

4 files changed

+1267
-1059
lines changed

.github/workflows/publish-alpha.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish Beta version to registry
2+
on:
3+
workflow_dispatch:
4+
5+
permissions:
6+
contents: write # to be able to publish a GitHub release
7+
issues: write # to be able to comment on released issues
8+
id-token: write # to enable use of OIDC for npm provenance
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
environment: development
14+
# restricts job to develop branch
15+
if: github.ref == 'refs/heads/develop'
16+
steps:
17+
- name: Checkout repo
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
persist-credentials: false
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: 'yarn'
28+
29+
- name: Install dependencies
30+
run: yarn --frozen-lockfile
31+
32+
- name: Build
33+
run: yarn build:packages
34+
35+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
36+
run: yarn npm audit
37+
38+
- name: Publish Alpha
39+
run: yarn multi-semantic-release --deps.bump=override --deps.release=patch --sequential-init
40+
env:
41+
NPM_CONFIG_PROVENANCE: true
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/publish.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ jobs:
3838
- name: Authenticate in npm
3939
run: |
4040
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
41-
echo "workspaces-update = false" >> .npmrc
42-
echo "provenance = true" >> .npmrc
41+
echo "workspaces-update=false" >> .npmrc
42+
echo "provenance=true" >> .npmrc
4343
env:
4444
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4545

4646
- name: Publish
4747
run: yarn multi-semantic-release --deps.bump=override --deps.release=patch --sequential-init
4848
env:
49+
NPM_CONFIG_PROVENANCE: true
4950
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5051
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@commitlint/config-conventional": "^17.7.0",
2626
"@lidofinance/eslint-config": "^0.35.0",
2727
"@next/eslint-plugin-next": "^14.0.1",
28-
"@qiwi/multi-semantic-release": "6.7.0",
28+
"@qiwi/multi-semantic-release": "7.1.1",
2929
"@typescript-eslint/eslint-plugin": "^5",
3030
"@typescript-eslint/parser": "^5.46.0",
3131
"eslint": "^8.46.0",
@@ -57,7 +57,12 @@
5757
],
5858
"release": {
5959
"branches": [
60-
"main"
60+
"main",
61+
{
62+
"name": "develop",
63+
"channel": "alpha",
64+
"prerelease": "alpha"
65+
}
6166
]
6267
},
6368
"packageManager": "[email protected]",

0 commit comments

Comments
 (0)