Skip to content

Commit

Permalink
Update ant.yml to include branch and commit sha in artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
AShiningRay committed Sep 19, 2024
1 parent 61f6e1c commit f5a7ed7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,21 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up OpenJDK 1.8
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '8'
- name: Build with Ant
run: ant -noinput -buildfile build.xml
- name: Compute commit short SHA
id: shortsha
run: echo "{name}={value}" >> $GITHUB_OUTPUT
run: |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV"
echo "Branch: ${{ env.branch }}"
echo "Sha: ${{ env.sha_short }}"
- uses: actions/upload-artifact@v4
with:
name: freej2me-${{ steps.shortsha.outputs.value }}
name: freej2me-${{ env.branch }}-${{ env.sha_short }}
path: build/*.jar

0 comments on commit f5a7ed7

Please sign in to comment.