Skip to content

Commit 0ea10cf

Browse files
Merge pull request #16 from IvanildoBarauna/feat-AutoRelease
feat AutoRelease
2 parents 1dd1938 + ae1a8eb commit 0ea10cf

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

.github/workflows/CD.yaml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
name: Build, Version, and Publish Package
1+
name: Build, Version, Release and Publish Package
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_dispatch:
75

86
jobs:
97
build:
@@ -28,18 +26,8 @@ jobs:
2826
- name: Increment version
2927
run: |
3028
poetry version patch # params: patch, minor, major
31-
git config --global user.name 'GitHub Actions'
32-
git config --global user.email '[email protected]'
33-
BRANCH_NAME=version-increment-$(date +%s)
34-
git checkout -b $BRANCH_NAME
3529
git commit -am "chore: Incremented version"
36-
git push --set-upstream origin $BRANCH_NAME
37-
echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
38-
unset GITHUB_TOKEN
39-
gh pr create --title "Version increment" --body "Incremented version to $(poetry version -s)" --head $BRANCH_NAME --base main
40-
gh pr merge --squash --admin --delete-branch
41-
git checkout main
42-
git pull origin main
30+
git push
4331
git tag $(poetry version -s)
4432
git push origin --tags
4533

0 commit comments

Comments
 (0)