Skip to content

Commit

Permalink
Merge pull request #228 from Brooooooklyn/upgrade-config
Browse files Browse the repository at this point in the history
chore: publish with provenance
  • Loading branch information
Brooooooklyn authored May 24, 2023
2 parents e99336f + a74f751 commit 171822b
Show file tree
Hide file tree
Showing 6 changed files with 442 additions and 349 deletions.
20 changes: 20 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base", "group:allNonMajor", ":preserveSemverRanges", ":disablePeerDependencies"],
"labels": ["dependencies"],
"packageRules": [
{
"matchPackageNames": ["@napi/cli", "napi", "napi-build", "napi-derive"],
"addLabels": ["napi-rs"],
"groupName": "napi-rs"
},
{
"matchPackagePatterns": ["^eslint", "^@typescript-eslint"],
"groupName": "linter"
}
],
"commitMessagePrefix": "chore: ",
"commitMessageAction": "bump up",
"commitMessageTopic": "{{depName}} version",
"ignoreDeps": []
}
13 changes: 6 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ env:
- .editorconfig
- docs/**
pull_request: null

permissions:
contents: read
id-token: write

jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
Expand Down Expand Up @@ -112,7 +117,6 @@ jobs:
if: ${{ !matrix.settings.docker }}
with:
node-version: 18
check-latest: true
cache: yarn
- name: Install
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -149,7 +153,6 @@ jobs:
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: 18
check-latest: true
cache: yarn
architecture: x86
- name: Build in docker
Expand Down Expand Up @@ -240,7 +243,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: yarn
- name: Install dependencies
run: yarn install --mode=skip-build
Expand Down Expand Up @@ -272,7 +274,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: yarn
- name: Install dependencies
run: yarn install --mode=skip-build
Expand Down Expand Up @@ -304,7 +305,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: yarn
- name: Install dependencies
run: |
Expand Down Expand Up @@ -393,7 +393,6 @@ jobs:
options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build'
run: |
set -e
apk add nodejs npm yarn
yarn test
test-linux-arm-gnueabihf-binding:
name: Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }}
Expand Down Expand Up @@ -452,7 +451,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
check-latest: true
cache: yarn
- name: Install dependencies
run: yarn install --mode=skip-build
Expand All @@ -467,6 +465,7 @@ jobs:
shell: bash
- name: Publish
run: |
npm config set provenance true
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
check-latest: true
cache: yarn

- name: Install
Expand All @@ -28,6 +27,15 @@ jobs:
toolchain: stable
components: rustfmt, clippy

- name: Cache cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: lint-cargo-cache

- name: 'Install dependencies'
run: yarn install --mode=skip-build

Expand All @@ -39,3 +47,6 @@ jobs:

- name: Clippy
run: cargo clippy

- name: Cargo test
run: cargo test
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,30 +71,30 @@
"postpublish": "pinst --enable"
},
"devDependencies": {
"@napi-rs/cli": "^2.14.0",
"@swc-node/register": "^1.5.4",
"@swc/core": "^1.3.24",
"@types/node": "^18.11.18",
"@napi-rs/cli": "^2.15.2",
"@swc-node/register": "^1.6.5",
"@swc/core": "^1.3.59",
"@types/node": "^20.2.3",
"@types/pinyin": "^2.10.0",
"@typescript-eslint/eslint-plugin": "^5.47.1",
"@typescript-eslint/parser": "^5.47.1",
"ava": "^5.1.0",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"ava": "^5.2.0",
"benny": "^3.7.1",
"conventional-changelog-cli": "^2.2.2",
"eslint": "^8.31.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-sonarjs": "^0.19.0",
"husky": "8",
"lint-staged": "^13.1.0",
"lint-staged": "^13.2.2",
"nodejieba": "^2.6.0",
"npm-run-all": "^4.1.5",
"pinst": "^3.0.0",
"pinyin": "^2.11.2",
"pinyin-pro": "^3.14.0",
"prettier": "^2.8.1",
"typescript": "^5.0.0"
"prettier": "^2.8.8",
"typescript": "^5.0.4"
},
"lint-staged": {
"*.@(js|ts|tsx)": [
Expand Down
9 changes: 0 additions & 9 deletions renovate.json

This file was deleted.

Loading

0 comments on commit 171822b

Please sign in to comment.