mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2024-12-13 22:05:39 +00:00
42 lines
908 B
YAML
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 }}
|
|
|