diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index f801c72..1b5e073 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,44 +1,39 @@ -name: Node.js Package +name: Publish to NPM & GitHub Packages on: - release: - types: [published] - workflow_dispatch: + release: + types: [ published ] + workflow_dispatch: jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 16 - - run: npm i + publish-npm: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16.x + registry-url: https://registry.npmjs.org/ + - run: npm i + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 16 - registry-url: https://registry.npmjs.org/ - - run: npm i - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 16 - registry-url: https://npm.pkg.github.com/ - - run: npm i - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GH_TOKEN}} \ No newline at end of file + publish-gpr: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16.x + registry-url: https://npm.pkg.github.com/ + - run: npm i + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GH_TOKEN}} diff --git a/package.json b/package.json index 30ca3f1..5290f22 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "readme": "https://github.com/Ayfri/discord-fetch/blob/main/README.md", "repository": { "type": "git", - "url": "https://github.com/Ayfri/discord-fetch" + "url": "https://github.com/Ayfri/discord-fetch-messages.git" }, "scripts": { "build": "tsc",