Fix indent. #2
Workflow file for this run
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: Bump Gato-X Version | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
new_version: | ||
description: 'New semantic version, e.g. 1.0.2' | ||
required: true | ||
type: string | ||
jobs: | ||
bump-version: | ||
if: ${{ github.actor == 'AdnaneKhan' }} | ||
runs-on: ubuntu-latest | ||
env: | ||
NEW_VERSION: ${{ github.event.inputs.new_version }} | ||
BRANCH_NAME: bump_version_${{ github.event.inputs.new_version }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Update pyproject.toml with new version | ||
run: | | ||
echo "Updating pyproject.toml with version $NEW_VERSION" | ||
sed -i "s/^version\s*=.*/version = \"$NEW_VERSION\"/" pyproject.toml | ||
git config user.name "${{ github.actor }}" | ||
git config user.email "${{ github.actor }}@users.noreply.github.com" | ||
- name: Create and push branch | ||
run: | | ||
git checkout -b $BRANCH_NAME | ||
git add pyproject.toml | ||
git commit -m "Bump version to $NEW_VERSION" | ||
git push origin $BRANCH_NAME | ||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
source_branch: ${{ env.BRANCH_NAME }} | ||
base: main | ||
title: "Bump version to ${{ env.NEW_VERSION }}" | ||
body: "This PR bumps the version to ${{ env.NEW_VERSION }}" | ||
draft: false |