Skip to content

Commit fbcdf83

Browse files
authored
build: Update release workflow to explicitly set version before release (#545)
1 parent 981b265 commit fbcdf83

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

.github/workflows/early-access.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
jobs:
1212
precheck:
1313
runs-on: ubuntu-20.04
14-
if: startsWith(github.event.head_commit.message, '[maven-release-plugin]') != true
14+
if: startsWith(github.event.head_commit.message, 'Releasing version') != true
1515
outputs:
1616
JAVAFX_VERSION: ${{ env.JAVAFX_VERSION }}
1717
JAVA_VERSION: ${{ env.JAVA_VERSION }}

.github/workflows/release.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,17 @@ jobs:
119119
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
120120
restore-keys: ${{ runner.os }}-m2
121121

122-
- name: Maven release
123-
id: vars
124-
shell: bash
125-
run: |
126-
mvn -B -ntp \
127-
-Drepository.url=https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git \
128-
release:prepare
129-
mvn -pl :parent process-resources
130-
131122
- name: Download all build artifacts
132123
uses: actions/download-artifact@v2
133124

125+
- name: Version
126+
run: |
127+
mvn -B -ntp versions:set versions:commit -DnewVersion=${{ needs.precheck.outputs.PROJECT_VERSION }}
128+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
129+
git config --global user.name "GitHub Action"
130+
git commit -a -m "Releasing version ${{ needs.precheck.outputs.PROJECT_VERSION }}"
131+
git push origin master
132+
134133
- name: Release with JReleaser
135134
env:
136135
JRELEASER_GITHUB_TOKEN: ${{ secrets.PAT }}

0 commit comments

Comments
 (0)