chore: Create gh-action to build native binaries for PRs #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Kubectl native | |
on: [pull_request] | |
jobs: | |
build: | |
name: Build kubectl-kport on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest,windows-latest,ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: '22.3.2' | |
java-version: '17' | |
components: "native-image" | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
native-image-job-reports: 'true' | |
- name: Build All in native mode | |
run: | | |
mvn clean install -DskipTests -Dnative | |
- name: Upload binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: kubectl-kport-${{ matrix.os }} | |
path: kubectl-kport/target/kubectl-kport | |
- name: Upload binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: kport-ide-server-${{ matrix.os }} | |
path: kport-ide-server/target/kport-ide-server | |