Skip to content

Commit 4452d4f

Browse files
committed
chore: simplify release to bump-only, add version:patch/minor/major scripts
1 parent 0b2ca45 commit 4452d4f

2 files changed

Lines changed: 8 additions & 13 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ name: Release @backendworks/auth-db
33
on:
44
workflow_dispatch:
55
inputs:
6-
version:
7-
description: "Exact version to release (e.g. 1.2.3)"
8-
required: true
9-
type: string
106
bump:
11-
description: "Or choose a semver bump type (ignored when version is set)"
12-
required: false
7+
description: "Version bump type"
8+
required: true
139
default: patch
1410
type: choice
1511
options:
@@ -68,14 +64,10 @@ jobs:
6864
git config user.name "github-actions[bot]"
6965
git config user.email "github-actions[bot]@users.noreply.github.com"
7066
71-
- name: Set version
67+
- name: Bump version
7268
id: version
7369
run: |
74-
if [ -n "${{ inputs.version }}" ]; then
75-
npm version "${{ inputs.version }}" --no-git-tag-version
76-
else
77-
npm version "${{ inputs.bump }}" --no-git-tag-version
78-
fi
70+
npm version ${{ inputs.bump }} --no-git-tag-version
7971
VERSION=$(node -p "require('./package.json').version")
8072
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
8173

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
"format": "prettier --write \"src/**/*.ts\"",
2626
"format:check": "prettier --check \"src/**/*.ts\"",
2727
"test": "jest --config test/jest.json --runInBand --forceExit",
28-
"test:cov": "jest --config test/jest.json --runInBand --forceExit --coverage"
28+
"test:cov": "jest --config test/jest.json --runInBand --forceExit --coverage",
29+
"version:patch": "npm version patch --no-git-tag-version",
30+
"version:minor": "npm version minor --no-git-tag-version",
31+
"version:major": "npm version major --no-git-tag-version"
2932
},
3033
"dependencies": {
3134
"@prisma/client": "^5.21.1"

0 commit comments

Comments
 (0)