Skip to content

Commit d99bc71

Browse files
authored
Create npm-publish.yml
1 parent 3741a8e commit d99bc71

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/npm-publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Publish odata-sql-connect package to npm
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
publish-npm:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: '20.x'
21+
registry-url: https://registry.npmjs.org/
22+
scope: '@slackbyte'
23+
- run: npm install
24+
- run: npm run clean
25+
- run: ls -lart
26+
- run: npm run build
27+
- run: ls -lart
28+
- run: npm test
29+
- run: npm publish --provenance --access public
30+
env:
31+
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}

0 commit comments

Comments
 (0)