Skip to content

Commit

Permalink
release github action added
Browse files Browse the repository at this point in the history
  • Loading branch information
abelozerov committed May 31, 2024
1 parent befba91 commit d86badb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflow/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: npm package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- run: npm ci
- run: npm test

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "A library enabling the transmission of large messages via chrome.runtime in Chrome Extensions with Manifest V3",
"main": "ext-send-chunked-message.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"No test specified\" && exit 0"
},
"repository": {
"type": "git",
Expand All @@ -27,5 +27,8 @@
"bugs": {
"url": "https://github.com/abelozerov/ext-send-chunked-message/issues"
},
"homepage": "https://github.com/abelozerov/ext-send-chunked-message#readme"
"homepage": "https://github.com/abelozerov/ext-send-chunked-message#readme",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

0 comments on commit d86badb

Please sign in to comment.