Skip to content

workflow updated

workflow updated #11

Workflow file for this run

name: Update NPM and Create Release
on:
push:
branches: [main]
workflow_dispatch:
jobs:
update-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
- name: Bump version
run: npm version minor -m "Bump version to %s"
- name: Push tags
run: git push --follow-tags
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: Auto-generated release from GitHub Actions.
draft: false
prerelease: false
- name: Publish to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}