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 056d8b7 commit ac64e57
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure Git
run: |
Expand All @@ -20,22 +22,31 @@ jobs:
- name: Create New Branch and Update version in setup.cfg
run: |
NEW_VERSION=${{ github.event.release.tag_name }} # Keep the 'v' prefix
NEW_VERSION="${{ github.event.release.tag_name }}" # Assuming the 'v' prefix is included
NEW_BRANCH="release-${NEW_VERSION}"
echo "NEW_BRANCH=$NEW_BRANCH" >> $GITHUB_ENV
echo "Creating new branch: $NEW_BRANCH"
git checkout -b $NEW_BRANCH
sed -i "s/^version = .*/version = $NEW_VERSION/" setup.cfg # Use $NEW_VERSION directly
# Update the version in setup.cfg
sed -i "s/^version = .*/version = $NEW_VERSION/" setup.cfg
git add setup.cfg
git commit -m "Release EEST $NEW_VERSION"
git push origin $NEW_BRANCH
git commit -m "feat(docs|fw): release EEST $NEW_VERSION"
git push --set-upstream origin $NEW_BRANCH
- name: Check changes after sed command
run: |
git diff
- name: List differences between new branch and main
run: |
git fetch origin main:main
git diff main...$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 }} # 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 }}`."
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ env.NEW_BRANCH }}
commit-message: "Release EEST $NEW_VERSION"
title: "feat(docs|fw): release EEST $NEW_VERSION"
body: "This PR updates the framework version in setup.cfg to $NEW_VERSION."
base: main

0 comments on commit ac64e57

Please sign in to comment.