Skip to content

Commit 4462cc4

Browse files
authored
Reset staging/main when preparing release
1 parent 4f44fee commit 4462cc4

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/create_release_tag.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,22 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
1417
- name: Set up Maven Central Repository
1518
uses: actions/setup-java@v4
1619
with:
1720
java-version: '17'
1821
distribution: 'temurin'
1922
cache: 'maven'
2023

24+
- name: Reset staging/main Staging
25+
id: staging
26+
run: |
27+
git checkout -Bt staging/main
28+
git push -f
29+
2130
- name: Set Release Version
2231
id: release
2332
run: |
@@ -29,7 +38,7 @@ jobs:
2938
commit_message: "Prepare release (${{ github.actor }}): github-api-${{ steps.release.outputs.version }}"
3039
tagging_message: 'github-api-${{ steps.release.outputs.version }}'
3140
branch: staging/main
32-
41+
3342
- name: Increment Snapshot Version
3443
run: |
3544
mvn versions:set versions:commit -DnextSnapshot
@@ -38,7 +47,7 @@ jobs:
3847
with:
3948
commit_message: "Prepare for next development iteration"
4049
branch: staging/main
41-
50+
4251
- name: pull-request to main
4352
uses: repo-sync/pull-request@v2
4453
with:

0 commit comments

Comments
 (0)