Attempt to fix getting version in GitHub action #9
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
# This workflow will build a Java project with Ant | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant | |
name: Java CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- name: Build with Ant | |
run: ant xar-local | |
- name: Get AjMC Version | |
id: get-ajmc-version | |
uses: mavrosxristoforos/[email protected] | |
with: | |
xml-file: 'expath-pkg.xml' | |
xpath: "//*[local-name()='package']/@version" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: 'AjMC-${{ steps.get-ajmc-version.outputs.info }}' | |
path: build |