diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f0a4768 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,70 @@ +name: Git Mkver Build + +# Trigger on every master branch push and pull request +on: + push: + branches: + - master + - patch-* + - ci-build + pull_request: + branches: + - master + +jobs: + + build: + + strategy: + matrix: + targetplatform: [x64] + + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + 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: + java-version: '19' + cache: 'sbt' + + - uses: graalvm/setup-graalvm@v1 + with: + version: '22.3.0' + java-version: '19' + components: 'native-image' + # github-token: ${{ secrets.GITHUB_TOKEN }} + native-image-job-reports: 'true' + +# - name: Install SBT +# uses: olafurpg/setup-scala@v11 +# with: +# sbt-version: '1.8.2' + + - name: Build with SBT + run: sbt assembly + +# - name: Compile +# shell: bash +# run: sbt assembly + + - name: Compile + shell: bash + run: | + pushd target/scala-2.12 + native-image -jar $(ls -1 git-mkver-assembly-*.jar) --no-fallback + popd + + - name: Upload binary + uses: actions/upload-artifact@v2 + with: + name: git-mkver + path: target\scala-2.12\git-mkver-*