Skip to content

Commit

Permalink
Workflow to publish package.
Browse files Browse the repository at this point in the history
  • Loading branch information
alfaslash committed Sep 16, 2021
1 parent 774b207 commit 143f5fd
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: compatibility-array-includes

on:
release:
types: [created]

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

publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ language: node_js
dist: trusty
sudo: required
node_js:
- "8"
- "12"
install:
- npm install
- npm ci
script:
- npm test
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
"homepage": "https://github.com/alfaslash/array-includes#readme",
"devDependencies": {
"jest": "27.2.0"
}
},
"publishConfig": {
"@alfaslash:registry": "https://npm.pkg.github.com"
}
}

0 comments on commit 143f5fd

Please sign in to comment.