Skip to content

Commit fd3c9c6

Browse files
authored
Merge pull request #116 from add2cal/dev
Dev
2 parents 486f143 + faf1109 commit fd3c9c6

File tree

4 files changed

+138
-137
lines changed

4 files changed

+138
-137
lines changed

.github/workflows/npm-publish.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
# This workflow will run tests using node and then publish a package to npm when a release is created
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
1+
# This workflow will build and publish a package to npm when a release is created
2+
# For more information see: https://docs.npmjs.com/trusted-publishers
33

44
name: npm publish
55

66
on:
77
release:
88
types: [published]
99

10+
permissions:
11+
id-token: write
12+
contents: read
13+
1014
env:
1115
TAG: '${{ github.event.release.tag_name }}'
1216

@@ -15,7 +19,7 @@ jobs:
1519
runs-on: ubuntu-latest
1620
steps:
1721
- name: Checkout code
18-
uses: actions/checkout@v4
22+
uses: actions/checkout@v5
1923
- name: Validate version tag pattern
2024
run: |
2125
if [[ ! "${{ env.TAG }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
@@ -41,31 +45,29 @@ jobs:
4145
runs-on: ubuntu-latest
4246
needs: validate-release
4347
steps:
44-
- uses: actions/checkout@v4
45-
- uses: actions/setup-node@v4
48+
- uses: actions/checkout@v5
49+
- uses: actions/setup-node@v6
4650
with:
4751
node-version: 22
52+
registry-url: https://registry.npmjs.org/
53+
cache: 'npm'
4854
- run: npm ci
4955
- run: npm run eslint
50-
- run: npm test
56+
- run: npm run test
5157

5258
build-and-publish:
5359
runs-on: ubuntu-latest
5460
needs: test
55-
permissions:
56-
contents: read
57-
id-token: write
5861
steps:
59-
- uses: actions/checkout@v4
60-
- uses: actions/setup-node@v4
62+
- uses: actions/checkout@v5
63+
- uses: actions/setup-node@v6
6164
with:
6265
node-version: 22
6366
registry-url: https://registry.npmjs.org/
6467
cache: 'npm'
65-
- run: npm install -g npm
68+
- name: Update npm
69+
run: npm install -g npm@latest
6670
- run: npm ci
6771
- run: npm run build
6872
- name: Publish package
69-
run: npm publish --provenance --tag ${{ github.event.release.prerelease && 'next' || 'latest' }}
70-
env:
71-
NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }}
73+
run: npm publish --tag ${{ github.event.release.prerelease && 'next' || 'latest' }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![Add to Calendar Button React Wrapper](https://github.com/add2cal/add-to-calendar-button-react/blob/main/assets/readme-header.png?raw=true)
22

33
![Version](https://img.shields.io/npm/v/add-to-calendar-button-react?style=for-the-badge&label=Version)
4-
[![Parent Script Version](https://img.shields.io/badge/Parent%20Script%20Version-v2.12.12-blue?style=for-the-badge)](https://github.com/add2cal/add-to-calendar-button)
4+
[![Parent Script Version](https://img.shields.io/badge/Parent%20Script%20Version-v2.12.13-blue?style=for-the-badge)](https://github.com/add2cal/add-to-calendar-button)
55
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/add-to-calendar-button-react?style=for-the-badge)](https://www.npmjs.com/package/add-to-calendar-button-react)
66
[![npm Installations](https://img.shields.io/npm/dt/add-to-calendar-button-react?label=npm%20Installations&style=for-the-badge)](https://www.npmjs.com/package/add-to-calendar-button-react)
77

0 commit comments

Comments
 (0)