Skip to content

Commit 0739342

Browse files
committed
build: update release workflow to include code checkout and linux arm support
1 parent 819066c commit 0739342

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

.github/actions/release/action.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,18 @@ runs:
5757
gpg-passphrase: MAVEN_GPG_PASSPHRASE
5858

5959
- name: Build
60-
run: mvn package -DskipTests
60+
run: |
61+
if [ "${{ inputs.platform-name }}" == "linux_arm" ]; then
62+
mvn package -DskipTests -Plinux-aarch32
63+
elif [ "${{ inputs.platform-name }}" == "linux_arm64" ]; then
64+
mvn package -DskipTests -Plinux-aarch64
65+
else
66+
mvn package -DskipTests
67+
fi
6168
shell: bash
6269

6370
- name: Test
71+
if: ${{ inputs.platform-name != 'linux_arm' && inputs.platform-name != 'linux_arm64' }}
6472
run: mvn -B jar:jar surefire:test
6573
shell: bash
6674

@@ -69,5 +77,12 @@ runs:
6977
MAVEN_USERNAME: ${{ inputs.maven-username }}
7078
MAVEN_TOKEN: ${{ inputs.maven-password }}
7179
MAVEN_GPG_PASSPHRASE: ${{ inputs.maven-gpg-passphrase }}
72-
run: mvn deploy -Prelease -DskipTests
80+
run: |
81+
if [ "${{ inputs.platform-name }}" == "linux_arm" ]; then
82+
mvn deploy -DskipTests -Prelease -Plinux-aarch32
83+
elif [ "${{ inputs.platform-name }}" == "linux_arm64" ]; then
84+
mvn deploy -DskipTests -Prelease -Plinux-aarch64
85+
else
86+
mvn deploy -DskipTests -Prelease
87+
fi
7388
shell: bash

.github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ jobs:
2020
prepare-release:
2121
runs-on: ubuntu-22.04
2222
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
- run: |
26+
git config --global user.name "${{ github.actor }}"
27+
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
28+
2329
- id: prepare
2430
name: Prepare release build
2531
uses: ./.github/actions/prepare-linux
@@ -35,15 +41,13 @@ jobs:
3541
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
3642
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3743

38-
- name: Checkout code
44+
- name: Update development version
3945
uses: actions/checkout@v4
4046
env:
4147
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
4248
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
4349
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
4450
- run: |
45-
git config --global user.name "${{ github.actor }}"
46-
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
4751
mvn release:prepare -DskipTests -DpushChanges=false -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
4852
git push
4953
git push --tags
@@ -94,6 +98,10 @@ jobs:
9498
fail-fast: false
9599
matrix:
96100
platform:
101+
- name: linux_arm
102+
runs-on: ubuntu-22.04
103+
- name: linux_arm64
104+
runs-on: ubuntu-22.04
97105
- name: linux_x86-64
98106
runs-on: ubuntu-22.04
99107
java: [17]
@@ -117,6 +125,7 @@ jobs:
117125
uses: ./.github/actions/prepare-linux
118126

119127
- name: Create Release # Create the release only once on Linux
128+
if: ${{ matrix.platform.name == 'linux_x86-64' }}
120129
uses: actions/create-release@v1
121130
env:
122131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)