Skip to content

Commit

Permalink
Use awk to determine artifact name
Browse files Browse the repository at this point in the history
  • Loading branch information
MacaylaMarvelous81 committed Jun 25, 2024
1 parent a8b825a commit 92dc452
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ jobs:
run: chmod +x ./gradlew
- name: Build
run: ./gradlew build
- name: Read gradle.properties
uses: madhead/[email protected]
id: properties
with:
file: gradle.properties
all: true
- name: Determine artifact name
id: name
run: |
BASE_NAME=$(awk -F '=' '/archives_base_name/ { print $2; }' gradle.properties)
VERSION=$(awk -F '=' '/mod_version/ { print $2; }' gradle.properties)
echo "name=$BASE_NAME-$VERSION.jar" >> $GITHUB_OUTPUT
- name: Generate artifact attestation
uses: actions/[email protected]
with:
subject-path: build/libs/${{ steps.properties.outputs.archives_base_name }}-${{ steps.properties.outputs.mod_version }}.jar
subject-path: build/libs/${{ steps.name.outputs.name }}
- name: Upload artifact
uses: actions/[email protected]
with:
name: Artifacts
path: build/libs/${{ steps.properties.outputs.archives_base_name }}-${{ steps.properties.outputs.mod_version }}.jar
path: build/libs/${{ steps.name.outputs.name }}

0 comments on commit 92dc452

Please sign in to comment.