Skip to content

Commit

Permalink
chore: adds opening a PR to bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
codemile committed Jun 1, 2024
1 parent 385ca59 commit 9f58055
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: "🚀 Release"

on:
workflow_dispatch:
inputs:
next_version:
type: choice
description: "How to bump the version?"
options:
- "major"
- "minor"
- "patch"

concurrency: "release"

Expand Down Expand Up @@ -118,3 +126,33 @@ jobs:
name: release.name,
body: release.body
});
bump-version:
runs-on: ubuntu-latest
needs: [ publish-release ]
steps:
- name: "📥 Checkout code"
uses: actions/checkout@v4

- name: "🔍 Bump package.json version"
run: |
yarn version --no-git-tag-version --${{ github.event.inputs.next_version }}
- name: "🔍 Read package.json version"
id: version
run: |
VERSION=$(jq -r .version < package.json)
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "::notice file={package.json},title={Bump Version}::Bump version: ${VERSION}"
- name: "🔄 Create Pull Request"
uses: peter-evans/create-pull-request@v6
with:
commit-message: "chore: bump version to v${{steps.version.outputs.version}}"
title: "chore: bump version to v${{steps.version.outputs.version}}"
body: "Bumps the version to v${{steps.version.outputs.version}}"
branch: "chore/bump-v${{steps.version.outputs.version}}"
labels: "release"
reviewers: "codemile"
assignees: "codemile"
draft: true

0 comments on commit 9f58055

Please sign in to comment.