Skip to content

Commit 3661028

Browse files
committed
fix: commit VERSION before release
1 parent 1d86748 commit 3661028

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,16 @@ jobs:
8181
key: ${{ runner.os }}-gradlew-${{ hashFiles('**/gradlew') }}
8282
restore-keys: ${{ runner.os }}-gradlew-
8383

84-
- name: Set release version
84+
- name: Version
8585
run: |
86-
VERSION=${{ inputs.version }}
87-
echo $VERSION > VERSION
86+
echo "VERSION=${{ inputs.version }}" >> $GITHUB_OUTPUT
87+
echo ${{ inputs.version }} > VERSION
88+
git add VERSION
89+
sed -i -e "s/^\:project-version\:\ .*/:project-version: ${{ inputs.version }}/g" README.adoc
90+
git config --global user.email "${{ secrets.COMMIT_EMAIL }}"
91+
git config --global user.name "Julien Ruaux"
92+
git commit -a -m "Releasing version ${{ inputs.version }}"
93+
git push origin ${{ inputs.branch }}
8894
8995
- name: Build
9096
run: |
@@ -134,14 +140,4 @@ jobs:
134140
name: artifact
135141
path: |
136142
out/jreleaser/trace.log
137-
out/jreleaser/output.properties
138-
139-
- name: Commit release version
140-
run: |
141-
VERSION=${{ inputs.version }}
142-
sed -i -e "s/^\:project-version\:\ .*/:project-version: $VERSION/g" README.adoc
143-
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
144-
git config --global user.name "GitHub Action"
145-
git add VERSION README.adoc
146-
git commit -a -m "Releasing version $VERSION"
147-
git push origin ${{ inputs.branch }}
143+
out/jreleaser/output.properties

0 commit comments

Comments
 (0)