fluence-js/.github/workflows/publish_branch.yml
folex 763e641fa2
KeyPair: add fromBytes, toEd25519PrivateKey (#78)
- fromBytes allows to pass any seed you want
- constructor takes PeerId (previously was empty and maybe private)
- toEd25519PrivateKey to complete the lifecycle.
2021-09-14 12:16:17 +03:00

44 lines
1000 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: Get branch name
run: |
BRANCH=${GITHUB_REF#refs/*/}
SANITIZED=$(echo "$BRANCH" | sed -e 's/[^a-zA-Z0-9-]/-/g')
echo "BRANCH_NAME=$SANITIZED" >> $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 }}