Skip to content

Commit

Permalink
Merge pull request #16 from IvanildoBarauna/feat-AutoRelease
Browse files Browse the repository at this point in the history
feat AutoRelease
  • Loading branch information
IvanildoBarauna authored Jun 11, 2024
2 parents 1dd1938 + ae1a8eb commit 0ea10cf
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/CD.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Build, Version, and Publish Package
name: Build, Version, Release and Publish Package

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
Expand All @@ -28,18 +26,8 @@ jobs:
- name: Increment version
run: |
poetry version patch # params: patch, minor, major
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
BRANCH_NAME=version-increment-$(date +%s)
git checkout -b $BRANCH_NAME
git commit -am "chore: Incremented version"
git push --set-upstream origin $BRANCH_NAME
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
unset GITHUB_TOKEN
gh pr create --title "Version increment" --body "Incremented version to $(poetry version -s)" --head $BRANCH_NAME --base main
gh pr merge --squash --admin --delete-branch
git checkout main
git pull origin main
git push
git tag $(poetry version -s)
git push origin --tags
Expand Down

0 comments on commit 0ea10cf

Please sign in to comment.