Auto Release #7
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: Auto Release | |
on: | |
workflow_dispatch: | |
inputs: | |
release_type: | |
description: "Select the type of release" | |
type: choice | |
options: | |
- patch | |
- minor | |
- major | |
jobs: | |
release: | |
name: Auto Release | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
show-progress: true | |
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
# Configure Git | |
- name: Configure Git | |
run: | | |
git config --global user.name ${{ secrets.PYANSYS_CI_BOT_USERNAME }} | |
git config --global user.email ${{ secrets.PYANSYS_CI_BOT_EMAIL }} | |
# Run the patch release script | |
- name: Run Patch Release Script | |
if: ${{ inputs.release_type == 'patch' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
run: | | |
./scripts/patch_release.sh | |
# Run the major/minor release script | |
- name: Run Major/Minor Release Script | |
if: ${{ inputs.release_type == 'major' || inputs.release_type == 'minor' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
run: | | |
./scripts/major_minor_release.sh ${{ inputs.release_type }} |