Bump actions/checkout from 4.2.1 to 4.2.2 #508
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |