diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 365ebd6e..cd16cfc8 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -10,4 +10,18 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - - run: echo 'This would run npm publish.' + - name: Setup + uses: actions/checkout@v4 + + - name: Checkout + working-directory: ./rari-npm + uses: actions/setup-node@v4 + with: + registry-url: "https://registry.npmjs.org/" + node-version-file: "package.json" + + - name: Publish + working-directory: ./rari-npm + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/rari-npm/.gitignore b/rari-npm/.gitignore index ed4598e7..204ade55 100644 --- a/rari-npm/.gitignore +++ b/rari-npm/.gitignore @@ -1,2 +1,2 @@ -node_modules -bin +node_modules/ +bin/ diff --git a/rari-npm/README.md b/rari-npm/README.md new file mode 100644 index 00000000..ceb60fac --- /dev/null +++ b/rari-npm/README.md @@ -0,0 +1,4 @@ +# rari on npm + +> [!WARNING] +> This is still experimental and work in progress. diff --git a/rari-npm/package.json b/rari-npm/package.json index acbfeba3..9b1e94fd 100644 --- a/rari-npm/package.json +++ b/rari-npm/package.json @@ -5,11 +5,16 @@ "main": "./lib/index.js", "types": "./lib/index.d.ts", "type": "module", + "repository": { + "type": "git", + "url": "https://github.com/mdn/rari" + }, + "homepage": "https://github.com/mdn/rari/tree/main/rari-npm", "scripts": { "postinstall": "node ./lib/postinstall.js" }, "bin": { - "rari": "./bin/rari" + "rari": "bin/rari" }, "author": "Florian Dieminger ", "license": "MPL-2.0",