Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer-tb committed Feb 17, 2024
1 parent 3f759c6 commit 7cafb73
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,35 @@ on:
release:
types: [published]

permissions:
contents: write

jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Update version in setup.cfg
run: |
NEW_VERSION=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//')
sed -i "s/^version = .*/version = $NEW_VERSION/" setup.cfg

- name: Create New Branch
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
- name: Create New Branch and Update version in setup.cfg
run: |
NEW_VERSION=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//')
NEW_BRANCH="release-${{ github.event.release.tag_name }}"
echo "NEW_BRANCH=$NEW_BRANCH" >> $GITHUB_ENV # Set NEW_BRANCH for the job
git checkout -b $NEW_BRANCH
sed -i "s/^version = .*/version = $NEW_VERSION/" setup.cfg
git add setup.cfg
git commit -m "Release EEST `${{ github.event.release.tag_name }}`"
git push origin $NEW_BRANCH
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Ensure you're passing the GITHUB_TOKEN
with:
branch: ${{ env.NEW_BRANCH }}
branch: ${{ env.NEW_BRANCH }} # Use the NEW_BRANCH environment variable
commit-message: "Release EEST `${{ github.event.release.tag_name }}`"
title: "feat(docs|fw): release EEST `${{ github.event.release.tag_name }}`"
body: "This PR updates the framework version in setup.cfg to `${{ github.event.release.tag_name }}`."
base: main


0 comments on commit 7cafb73

Please sign in to comment.