Skip to content

Commit dfc95ed

Browse files
committed
build: add multi-platform build
1 parent 4c3c9f4 commit dfc95ed

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/cloud-storage-build-and-push-native-image.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ env:
1010

1111
jobs:
1212
setup-build-publish-deploy:
13-
name: Setup, Build, and Publish
14-
runs-on: ubuntu-latest
13+
name: 'Build Native Image ${{ matrix.platform }}'
14+
strategy:
15+
matrix:
16+
os: [ macos-latest, ubuntu-latest ]
17+
include:
18+
- os: 'ubuntu-latest'
19+
platform: 'linux-amd64'
20+
- os: 'macos-latest'
21+
platform: 'darwin-arm64'
22+
runs-on: ${{ matrix.os }}
1523
steps:
1624

1725
- name: Checkout
@@ -45,10 +53,11 @@ jobs:
4553
-jar pgadapter.jar \
4654
--no-fallback
4755
48-
tar -czvf pgadapter-linux-x64.tar.gz pgadapter
49-
cp "pgadapter-linux-x64.tar.gz" "pgadapter-linux-x64-$VERSION.tar.gz"
50-
echo "native_image=target/pgadapter/pgadapter-linux-x64-$VERSION.tar.gz" >> $GITHUB_ENV
51-
echo "native_image_current=target/pgadapter/pgadapter-linux-x64.tar.gz" >> $GITHUB_ENV
56+
export OS=`echo $
57+
tar -czvf "pgadapter-${{ matrix.platform }}.tar.gz" pgadapter
58+
cp "pgadapter-${{ matrix.platform }}.tar.gz" "pgadapter-${{ matrix.platform }}-$VERSION.tar.gz"
59+
echo "native_image=target/pgadapter/pgadapter-${{ matrix.platform }}-$VERSION.tar.gz" >> $GITHUB_ENV
60+
echo "native_image_current=target/pgadapter/pgadapter-${{ matrix.platform }}.tar.gz" >> $GITHUB_ENV
5261
echo ${{ env.native_image }}
5362
echo ${{ env.native_image_current }}
5463

0 commit comments

Comments
 (0)