diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..e4250eb --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,32 @@ +name: NPM Publish +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + id-token: write # Required for OIDC + contents: write + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: ".node-version" + registry-url: https://registry.npmjs.org + + - name: Install npm + run: npm install -g npm@11.5.1 + + - name: Install dependencies + run: npm install + + - name: Publish to npm + id: publish + uses: JS-DevTools/npm-publish@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ae85272..2f97951 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,30 +1,29 @@ -name: Workflow Test +name: Workflow Test on: push - jobs: node_tests: runs-on: ubuntu-latest strategy: matrix: - node: ['16'] + node: ['20'] steps: - - uses: actions/checkout@v2 - - name: Setup - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node }} - - name: Create NYC folder - run: mkdir .nyc_output - - name: Install Dependencies - run: npm install - - name: Run tests - run: npm run test + - uses: actions/checkout@v2 + - name: Setup + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + - name: Create NYC folder + run: mkdir .nyc_output + - name: Install Dependencies + run: npm install + - name: Run tests + run: npm run test # - name: Coverage # run: npm run test-lcov # - name: Coveralls # uses: coverallsapp/github-action@master # with: # github-token: ${{ secrets.GITHUB_TOKEN }} - # path-to-lcov: ./coverage/lcov.info \ No newline at end of file + # path-to-lcov: ./coverage/lcov.info diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..5b811e5 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +20.19.4 \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b2a344a..c6de62f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lob/react-address-autocomplete", - "version": "2.2.0", + "version": "3.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lob/react-address-autocomplete", - "version": "2.2.0", + "version": "3.0.0", "license": "MIT", "dependencies": { "base-64": "^1.0.0", @@ -28,7 +28,8 @@ "react-scripts": "5.0.0" }, "engines": { - "node": ">=14" + "node": ">=20", + "npm": ">=11.5.1" }, "peerDependencies": { "react": "^18.0.0", diff --git a/package.json b/package.json index 729efe4..45dae9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lob/react-address-autocomplete", - "version": "2.2.0", + "version": "3.0.0", "description": "A collection of components and utility functions for verifying and suggesting addresses using Lob", "author": "Lob", "license": "MIT", @@ -8,7 +8,8 @@ "module": "dist/index.modern.js", "source": "src/index.js", "engines": { - "node": ">=14" + "node": ">=20", + "npm": ">=11.5.1" }, "scripts": { "build": "microbundle-crl --no-compress --format modern,cjs --css inline",