diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 68a07cde..b6149c3e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Publish package to GitHub Packages +name: Publish package to NPM on: release: types: [published] @@ -14,10 +14,9 @@ jobs: - uses: actions/setup-node@v3 with: node-version: "16.x" - registry-url: "https://npm.pkg.github.com" - run: npm ci - run: npm run proto - run: npm run build - - run: npm publish --tag latest + - run: npm publish --tag latest --access public env: - NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e732cd07..faf25e17 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: - name: Publish snapshot if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} env: - NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | # We're using 0.0.0 to avoid this version to be higher than released versions. # To use it: @@ -45,7 +45,7 @@ jobs: # We use dist-tag dev for the snapshot releases, see https://docs.npmjs.com/cli/v9/commands/npm-dist-tag for more info # A snapshot MUST not be published with latest tag (omitting --tag defaults to latest) to avoid users to install snapshot releases # when using npm install - npm publish --tag dev + npm publish --tag dev --access public e2e: permissions: diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 9e53c381..00000000 --- a/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -@restatedev:registry=https://npm.pkg.github.com/ -//npm.pkg.github.com/:_authToken=${NPM_TOKEN} diff --git a/package.json b/package.json index edc69ebb..4ef980e7 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ } }, "publishConfig": { - "@restatedev:registry": "https://npm.pkg.github.com" + "@restatedev:registry": "https://registry.npmjs.org" }, "type": "commonjs", "main": "dist/public_api.js", @@ -63,5 +63,13 @@ "ts-node-dev": "^2.0.0", "typescript": "^4.9.5", "express": "*" + }, + "bugs": { + "url": "https://github.com/restatedev/sdk-typescript/issues" + }, + "homepage": "https://github.com/restatedev/sdk-typescript#readme", + "directories": { + "example": "examples", + "test": "test" } }