Skip to content

Commit 55726dc

Browse files
committed
release flow
1 parent 45120ff commit 55726dc

1 file changed

Lines changed: 24 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,18 @@ jobs:
2929
graalvm-version: 21.3.0
3030
native-image: true
3131

32+
- name: Export Properties
33+
id: properties
34+
shell: bash
35+
run: |
36+
PROPERTIES="$(./gradlew properties --console=plain -q)"
37+
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
38+
echo "::set-output name=version::$VERSION"
39+
echo "SPP_CLI_VERSION=$VERSION" >> $GITHUB_ENV
40+
echo "SPP_RELEASE_VERSION=${VERSION/-SNAPSHOT/}" >> $GITHUB_ENV
41+
3242
- name: Build native spp-cli
33-
run: gradle assemble nativeImage -Dbuild.profile=release
43+
run: gradle assemble nativeImage -Dbuild.profile=release -PprojectVersion=$SPP_RELEASE_VERSION
3444

3545
- name: "[CLI] Get version"
3646
run: ./build/graal/spp-cli -v version
@@ -65,8 +75,18 @@ jobs:
6575
graalvm-version: 21.3.0
6676
native-image: true
6777

78+
- name: Export Properties
79+
id: properties
80+
shell: bash
81+
run: |
82+
PROPERTIES="$(./gradlew properties --console=plain -q)"
83+
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
84+
echo "::set-output name=version::$VERSION"
85+
echo "SPP_CLI_VERSION=$VERSION" >> $GITHUB_ENV
86+
echo "SPP_RELEASE_VERSION=${VERSION/-SNAPSHOT/}" >> $GITHUB_ENV
87+
6888
- name: Build native spp-cli.exe
69-
run: ./gradlew assemble nativeImage '-Dbuild.profile=release'
89+
run: ./gradlew assemble nativeImage '-Dbuild.profile=release' '-PprojectVersion=$SPP_RELEASE_VERSION'
7090
shell: powershell
7191

7292
- name: "[CLI] Get version"
@@ -114,8 +134,9 @@ jobs:
114134
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
115135
echo "::set-output name=version::$VERSION"
116136
echo "SPP_CLI_VERSION=$VERSION" >> $GITHUB_ENV
137+
echo "SPP_RELEASE_VERSION=${VERSION/-SNAPSHOT/}" >> $GITHUB_ENV
117138
118-
- run: ./gradlew assembleUp nativeImage -Dbuild.profile=release
139+
- run: ./gradlew assembleUp nativeImage -Dbuild.profile=release -PprojectVersion=$SPP_RELEASE_VERSION
119140

120141
- name: Docker IPs
121142
run: docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)

0 commit comments

Comments
 (0)