Skip to content

Commit 70f867e

Browse files
authored
Merge pull request #161 from boscop-fr/feature-trusted-publishing
Npm trusted publishing
2 parents 60eaa9f + a539e39 commit 70f867e

4 files changed

Lines changed: 33 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publication
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
env:
16+
DIST_TAG: |-
17+
${{ case(
18+
contains(github.ref_name, 'alpha'), 'alpha',
19+
startsWith(github.ref_name, 'v2'), 'previous',
20+
'latest'
21+
) }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: lts/*
27+
- run: npm ci
28+
- run: npx playwright install --with-deps
29+
- run: npm publish --tag $DIST_TAG

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
registry=https://registry.npmjs.org
2+
provenance=true

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "orejime",
3-
"version": "3.1.1",
3+
"version": "3.1.2-alpha.0",
44
"description": "A lightweight and accessible consent manager",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)