Prepare new release #5
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: Prepare new release | |
on: | |
workflow_dispatch: | |
inputs: | |
versionBump: | |
description: "Type of version bump (major, minor, patch)" | |
required: true | |
default: "patch" | |
type: choice | |
options: | |
- "false" | |
- "minor" | |
- "patch" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-root | |
cancel-in-progress: true | |
jobs: | |
prepare_release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: pnpm/action-setup@v4 | |
with: | |
run_install: true | |
- name: Build project | |
run: SKIP_ENV_VALIDATION=1 pnpm run build | |
- name: Set up Git | |
run: | | |
git config user.name "Aamir Azad" | |
git config user.email "[email protected]" | |
- name: Get tag | |
id: get_tag | |
run: | | |
git branch --show-current | |
git pull | |
echo "::set-output name=version::v$(pnpm pkg get version | tr -d '\"')" | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: ./build/* | |
tag_name: ${{ steps.get_tag.outputs.version }} | |
name: v${{ steps.get_tag.outputs.version }} | |
# Automatically generate release notes based on commits | |
generate_release_notes: true | |
draft: true | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |