Skip to content

build(rename.yml): add action to rename package #1

build(rename.yml): add action to rename package

build(rename.yml): add action to rename package #1

Workflow file for this run

name: Rename package
env:
PACKAGE_NAME: python_package_template
on:
push:
branches:
- main
jobs:
rename:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Check if the old package name still exists.
- name: Check for old package name
id: check_name
run: |
if grep -r '${{env.PACKAGE_NAME}}' .; then
echo "found=true" >> $GITHUB_OUTPUT
else
echo "found=false" >> $GITHUB_OUTPUT
fi
# Only run the rename action if the old package name is found.
- name: Rename using github-template-rename-action
if: steps.check_name.outputs.found == 'true'
uses: kota65535/github-template-rename-action@v1
with:
from-name: ${{env.PACKAGE_NAME}}