Skip to content

Update Packages (#156) #44

Update Packages (#156)

Update Packages (#156) #44

Workflow file for this run

name: Bump and release NPM Version
on:
push:
branches:
- master
# file paths to consider in the event. Optional; defaults to all.
paths-ignore:
- 'package.json'
- 'package-lock.json'
jobs:
build:
runs-on: ubuntu-latest
outputs:
nodeVersion: ${{ steps.bump_version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20'
- name: bump version
id: bump_version
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
echo "::set-output name=version::$(echo $(node -p "require('./package.json').version.trim()"))"
npm version patch
git push
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: draft release
id: draft_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ needs.build.outputs.nodeVersion }}
release_name: Release ${{ needs.build.outputs.nodeVersion }}
body: |
Releasing version ${{ needs.build.outputs.nodeVersion }} to NPM
draft: true
prerelease: false