|
36 | 36 |
|
37 | 37 | env:
|
38 | 38 | RELEASE_VERSION: ${{ inputs.version }}
|
| 39 | + BRANCH_NAME: ${{ inputs.phase }}-release-v${{ inputs.version }} |
39 | 40 |
|
40 | 41 | permissions:
|
41 | 42 | contents: read
|
@@ -64,25 +65,25 @@ jobs:
|
64 | 65 |
|
65 | 66 | - uses: actions/checkout@v4
|
66 | 67 | with:
|
67 |
| - ref: ${{ inputs.ref || 'main' }} |
| 68 | + ref: ${{ inputs.ref }} |
68 | 69 | token: ${{ env.GITHUB_TOKEN }}
|
69 | 70 |
|
70 |
| - - name: Create the release tag |
| 71 | + - name: Create the release tag (post phase) |
71 | 72 | if: inputs.phase == 'post'
|
72 | 73 | run: |
|
73 | 74 | git tag "v${{ env.RELEASE_VERSION }}"
|
74 | 75 | git push origin "v${{ env.RELEASE_VERSION }}"
|
75 | 76 |
|
76 | 77 | - name: Create a ${{ inputs.phase }} release branch
|
77 |
| - run: git checkout -b ${{ inputs.phase }}-release-v${{ env.RELEASE_VERSION }} |
| 78 | + run: git checkout -b ${{ env.BRANCH_NAME }} |
78 | 79 |
|
79 |
| - - name: Pre bump versions |
| 80 | + - name: Pre bump versions (pre phase) |
80 | 81 | if: inputs.phase == 'pre'
|
81 | 82 | uses: ./.github/workflows/maven-goal
|
82 | 83 | with:
|
83 | 84 | command: ./mvnw -V versions:set -DprocessAllModules=true -DgenerateBackupPoms=false -DnewVersion=${{ env.RELEASE_VERSION }}
|
84 | 85 |
|
85 |
| - - name: Post bump versions |
| 86 | + - name: Post bump versions (post phase) |
86 | 87 | if: inputs.phase == 'post'
|
87 | 88 | uses: ./.github/workflows/maven-goal
|
88 | 89 | with:
|
|
92 | 93 | run: |
|
93 | 94 | git add --all
|
94 | 95 | git commit -m "release(${{ inputs.phase }}): ecs-logging-java v${{ env.RELEASE_VERSION }}"
|
95 |
| - git push origin ${{ inputs.phase }}-release-v${{ env.RELEASE_VERSION }} |
| 96 | + git push origin ${{ env.BRANCH_NAME }} |
96 | 97 |
|
97 | 98 | - name: Create the ${{ inputs.phase }} release PR
|
98 |
| - run: gh pr create --title="${{ inputs.phase }} release v${{ env.RELEASE_VERSION }}" --base main --head ${{ inputs.phase }}-release-v${{ env.RELEASE_VERSION }} -b "${{ inputs.phase }} release v${{ env.RELEASE_VERSION }}" |
| 99 | + run: gh pr create --title="${{ inputs.phase }} release v${{ env.RELEASE_VERSION }}" --base main --head ${{ env.BRANCH_NAME }} -b "${{ inputs.phase }} release v${{ env.RELEASE_VERSION }}" |
0 commit comments