fluence-js/.github/workflows/publish_branch.yml

42 lines
908 B
YAML

name: "publish-branch"
on:
push:
branches-ignore:
- master
jobs:
npm-publish:
name: "Publish"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Extract branch name
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
### Set version
- name: Set version
run: npm version prerelease --no-git-tag-version --preid ${{ env.BRANCH_NAME }}-${{ github.run_number }}
### Publish to NPM registry
- uses: actions/setup-node@v1
with:
node-version: '15'
registry-url: 'https://registry.npmjs.org'
- run: cat package.json
- run: npm i
- run: npm run build
- run: npm publish --access public --tag=beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}