Skip to content

Commit

Permalink
workflow updated
Browse files Browse the repository at this point in the history
  • Loading branch information
gitdog01 committed Nov 22, 2023
1 parent 7522e58 commit 01f69e4
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
name: Create Release
name: Update NPM and Create Release

on:
push:
tags:
- 'v*'
branches: [main]
workflow_dispatch:

jobs:
release:
update-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- 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
Expand All @@ -22,3 +36,8 @@ jobs:
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 }}

0 comments on commit 01f69e4

Please sign in to comment.