Skip to content

Bump version app and create PR #4

Bump version app and create PR

Bump version app and create PR #4

Workflow file for this run

name: Bump version Publish NT CSS Framework
on:
workflow_dispatch:
inputs:
version:
description: 'Semver type of new version (major / minor / patch)'
required: true
type: choice
options:
- patch
- minor
- major
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Setup Git
run: |
git config user.name 'khoilen'
git config user.email '[email protected]'
- name: bump version
id: bump-version
run: |
pnpm version ${{ github.event.inputs.version }}
version=$(jq -r '.version' apps/nt-stylesheet/package.json)
echo "Bumped version: $version"
echo "new_version=$version" >> $GITHUB_ENV
working-directory: apps/nt-stylesheet
continue-on-error: true
- name: Push latest version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git tag "v${{ steps.bump-version.outputs.new_version }}"
git push origin "v${{ steps.bump-version.outputs.new_version }}"
working-directory: apps/nt-stylesheet