Initial Commit
This commit is contained in:
33
.gitea/workflows/publish.yml
Normal file
33
.gitea/workflows/publish.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Publish to NPM Registry
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '20.x'
|
||||
registry-url: 'https://git.dragonchain.com/api/packages/dragonchain/npm/'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
|
||||
- name: Build package
|
||||
run: npm run build
|
||||
|
||||
- name: Publish to Gitea NPM registry
|
||||
run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
Reference in New Issue
Block a user