Skip to content

Change working directory #14

Change working directory

Change working directory #14

Workflow file for this run

name: build
on: [ push, pull_request, workflow_dispatch ]
jobs:
build:
if: ${{ !contains(github.head_ref, 'translations/') }}
runs-on: ubuntu-latest
env:
ORG_GRADLE_PROJECT_buildNumber: ${{ github.run_number }}
ORG_GRADLE_PROJECT_runAttempt: ${{ github.run_attempt }}
ORG_GRADLE_PROJECT_runningOnCi: ${{ true }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build --no-daemon
- name: Read Project Version
id: read_property_sba_version
uses: christian-draeger/[email protected]
with:
path: gradle.properties
properties: version
- name: Read MC Version
id: read_property_mc_version
uses: christian-draeger/[email protected]
with:
path: gradle.properties
properties: minecraftVersion
- name: 'DEBUG: list files in build/libs'
run: |
ls -l build/libs
ls -l
- name: Unzip Jar
working-directory: build/libs
run: 7z x build/libs/SkyblockAddons-${{ steps.read_property_sba_version.outputs.version }}+${{ github.run_number }}-for-MC-${{ steps.read_property_mc_version.outputs.minecraftVersion }}.jar
- name: Upload Artifact
env:
project_version: ${{ steps.read_properties.outputs.version }}
uses: actions/upload-artifact@v3
with:
name: SkyblockAddons-${{ steps.read_property_sba_version.outputs.version }}+${{ github.run_number }}-for-MC-${{ steps.read_property_mc_version.outputs.minecraftVersion }}
path: |
build/libs/*
!build/libs/*.jar
# - name: Upload Artifact
# env:
# project_version: ${{ steps.read_properties.outputs.version }}
# uses: actions/upload-artifact@v3
# with:
# name: SkyblockAddons-${{ steps.read_property_sba_version.outputs.version }}+${{ github.run_number }}-for-MC-${{ steps.read_property_mc_version.outputs.minecraftVersion }}.jar
# path: build/libs/SkyblockAddons-${{ steps.read_property_sba_version.outputs.version }}+${{ github.run_number }}-for-MC-${{ steps.read_property_mc_version.outputs.minecraftVersion }}.jar