Skip to content

2.0.0-beta.2

2.0.0-beta.2 #19

Workflow file for this run

# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Publish
on:
release:
types: [created]
jobs:
publish-npm:
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: 'actions/[email protected]'
with:
ref: master
- name: Node setup
uses: 'actions/[email protected]'
with:
node-version: 16
registry-url: 'https://registry.npmjs.org/'
- name: Git configuration
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
- name: Installation
run: 'npm ci'
- name: Build
run: 'npm run build'
- name: Determine new version
run: |
echo "$GITHUB_REF"
IFS='/' read -ra PARTS <<< "$GITHUB_REF"
NEW_VERSION="${PARTS[2]}"
echo "$NEW_VERSION"
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
- name: Bump version
run: |
npm version ${{ env.NEW_VERSION }}
git status
- name: Commit and push
run: |
git status
git push
- name: Publish
run: 'npm publish'
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}