Skip to content

Bump actions/setup-node from 4.0.4 to 4.1.0 #509

Bump actions/setup-node from 4.0.4 to 4.1.0

Bump actions/setup-node from 4.0.4 to 4.1.0 #509

Workflow file for this run

name: Release
on:
pull_request:
types: closed
jobs:
release:
name: Release
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged && (
contains(github.event.pull_request.labels.*.name, 'npm-patch') ||
contains(github.event.pull_request.labels.*.name, 'npm-minor') ||
contains(github.event.pull_request.labels.*.name, 'npm-major')
)
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Node.js v12
uses: actions/[email protected]
with:
node-version: 12
registry-url: https://registry.npmjs.org/
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Setup git
run: |
git remote add gh-origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git config user.name "Flo Edelmann"
git config user.email "[email protected]"
- name: Bump patch version
if: contains(github.event.pull_request.labels.*.name, 'npm-patch')
run: npm version patch --force -m "Version %s"
- name: Bump minor version
if: contains(github.event.pull_request.labels.*.name, 'npm-minor')
run: npm version minor --force -m "Version %s"
- name: Bump major version
if: contains(github.event.pull_request.labels.*.name, 'npm-major')
run: npm version major --force -m "Version %s"
- name: Release new version
run: |
npm publish --access public
git push gh-origin HEAD:main --tags
VERSION_NUMBER=$(git tag --list | tail -n 1 | cut -d v -f 2)
echo "VERSION_NUMBER=$VERSION_NUMBER" >> $GITHUB_ENV
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_TOKEN }}
- name: Create GitHub Release
uses: actions/[email protected]
with:
tag_name: v${{ env.VERSION_NUMBER }}
release_name: Version ${{ env.VERSION_NUMBER }}
body: |
**NEW:**
**FIXED:**
**IMPROVED:**
**META:**
**BREAKING:**
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}