Skip to content

Commit

Permalink
chore: Update actions, should fix github package publishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayfri committed Oct 15, 2022
1 parent e7f657f commit 33eb43d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 40 deletions.
73 changes: 34 additions & 39 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -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}}
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}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 33eb43d

Please sign in to comment.