Skip to content

Upload .jar file as artifact instead of .zip #2

Upload .jar file as artifact instead of .zip

Upload .jar file as artifact instead of .zip #2

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_properties
uses: christian-draeger/[email protected]
with:
path: gradle.properties
properties: version
- name: Read MC Version
id: read_properties

Check failure on line 33 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 33, Col: 11): The identifier 'read_properties' may not be used more than once within the same scope.
uses: christian-draeger/[email protected]
with:
path: gradle.properties
properties: minecraftVersion
- name: Upload Artifact
env:
project_version: ${{ steps.read_properties.outputs.version }}
uses: actions/upload-artifact@v3
with:
# name: SkyblockAddons-${{ steps.read_properties.outputs.version }}+${{ github.run_number }}-for-MC-${{ steps.read_properties.outputs.minecraftVersion }}
path: build/libs/SkyblockAddons-${{ steps.read_properties.outputs.version }}+${{ github.run_number }}-for-MC-${{ steps.read_properties.outputs.minecraftVersion }}