Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DancingSnow0517 authored May 8, 2024
1 parent 7291557 commit fe62469
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: checkout
uses: actions/checkout@v3.1.0
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3
- name: Setup Java 17
uses: actions/setup-java@v3.6.0
with:
Expand All @@ -37,21 +37,27 @@ jobs:
- name: make gradle wrapper executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Build with Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build
uses: gradle/gradle-build-action@v2.4.2
env:
GITHUB_RUN_NUMBER: ${{ vars.GITHUB_RUN_NUMBER }}
run: ./gradlew build
- name: Read Properties
id: 'properties'
uses: christian-draeger/read-properties@1.1.1
with:
arguments: build
path: gradle.properties
properties: 'mod_id mod_name'
- name: Get Version
id: version
run: |
version=$(ls forge/build/libs/* | grep sources.jar -v | grep shadow.jar -v | grep slim.jar -v | awk -F 'examplemod-forge-|.jar' '{print $2}')
version=$(ls forge/build/libs/* | grep sources.jar -v | grep shadow.jar -v | grep slim.jar -v | awk -F '${{ steps.properties.outputs.mod_id }}-forge-|.jar' '{print $2}')
echo version=$version >> $GITHUB_OUTPUT
- name: capture build artifacts
uses: actions/upload-artifact@v3.1.1
with:
name: ExampleMod-${{ steps.version.outputs.version }}
name: "${{ steps.properties.outputs.mod_name }}-${{ steps.version.outputs.version }}"
path: |
fabric/build/libs/*.jar
forge/build/libs/*.jar
Expand Down

0 comments on commit fe62469

Please sign in to comment.