Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
39 changes: 22 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ on:
workflow_dispatch:

permissions:
# Enable the use of OIDC for npm provenance
# Enable the use of OIDC for trusted publishing and npm provenance
id-token: write
# Enable the use of GitHub Packages registry
contents: read
packages: write
# Enable Release Please to publish a GitHub release
contents: read

jobs:
publish:
Expand All @@ -23,13 +24,14 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Read Node.js version from '.nvmrc'
id: nvmrc
run: |
echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- uses: actions/setup-node@v1

- name: Prepare Node.js environment
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }}
node-version-file: '.nvmrc'

- name: Ensure npm 11.5.1 or later is installed
run: npm install -g npm@latest

# Remove any registry configurations from .npmrc
- run: sed -i "/@doist/d" ./.npmrc
Expand All @@ -43,21 +45,24 @@ jobs:
- run: npm run build

# Publish to GitHub package registry
- uses: actions/setup-node@v1
- name: Publish to GitHub Package Registry
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }}
node-version-file: '.nvmrc'
registry-url: https://npm.pkg.github.com/
scope: '@doist'
- run: npm publish --provenance
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Clear npm config between GitHub/npm registries
run: rm -f $NPM_CONFIG_USERCONFIG

# Publish to npm registry
- uses: actions/setup-node@v1
- name: Publish to npm registry
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }}
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org/
scope: '@doist'
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish --provenance --access public
11 changes: 5 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Read Node.js version from '.nvmrc'
id: nvmrc
run: |
echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
- uses: actions/setup-node@v1

- name: Prepare Node.js environment
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }}
node-version-file: '.nvmrc'

- run: npm ci
- run: npm run lint
- run: npm run type-check
Expand Down
5 changes: 3 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
engine-strict=true

# Ensure dependencies are installed from the npm registry instead of GitHub
# if you've defined the default registry for @doist in another .npmrc
@doist:registry=https://registry.npmjs.org/

# Refuse to install any package incompatible with the current Node.js version
engine-strict=true
31 changes: 21 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"name": "@doist/reactist",
"description": "Open source React components by Doist",
"version": "28.7.0",
"repository": "https://github.com/Doist/reactist",
"homepage": "https://github.com/Doist/reactist#readme",
"author": {
"name": "Henning Muszynski",
"email": "henning@doist.com",
"url": "http://doist.com"
},
"version": "28.7.0",
"license": "MIT",
"homepage": "https://github.com/Doist/reactist#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/Doist/reactist.git"
},
"prettier": "@doist/prettier-config",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down