Merge pull request #208 from d-velop/main #125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release-next | |
on: | |
push: | |
branches: | |
- develop | |
- feature/* | |
jobs: | |
publish-next: | |
if: "github.repository == 'd-velop/dvelop-sdk-node'" | |
name: Publish to npm as next | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- name: Install npm dependencies | |
run: npm ci | |
- name: Run build | |
run: npm run build | |
- name: Set release credentials | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish code to npm | |
run: npm run publish:next | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |