ci: add builds for all distributions (#41) #19
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: Git Mkver Build | |
# Trigger on every master branch push and pull request | |
on: | |
push: | |
branches: | |
- master | |
- patch-* | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build-on-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '20' | |
cache: 'sbt' | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
distribution: 'graalvm' | |
java-version: '20' | |
components: 'native-image' | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
native-image-job-reports: 'true' | |
- name: Build | |
run: .\build-windows.ps1 | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: git-mkver-windows | |
path: target\scala-2.12\git-mkver-windows-amd64-*.zip | |
build-on-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '20' | |
cache: 'sbt' | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
distribution: 'graalvm' | |
java-version: '20' | |
components: 'native-image' | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
native-image-job-reports: 'true' | |
- name: Build | |
run: ./build-linux.sh | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: git-mkver-linux | |
path: target/git-mkver-linux-*.tar.gz | |
build-universal: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '20' | |
cache: 'sbt' | |
- name: Build | |
run: ./build-universal.sh | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: git-mkver-universal | |
path: target/universal/git-mkver-*.zip | |
build-on-mac-x64: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '20' | |
cache: 'sbt' | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
distribution: 'graalvm' | |
java-version: '20' | |
components: 'native-image' | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
native-image-job-reports: 'true' | |
- name: Build | |
run: ./build-macos.sh | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
name: git-mkver-darwin | |
path: target/git-mkver-darwin-*.tar.gz |