Skip to content

Commit

Permalink
ci: fix bug in GitHub Action yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Suisuroru committed Jan 20, 2025
1 parent c0fb457 commit b55ea57
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/auto_build_jar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,21 @@ jobs:
- name: Rename JAR file
id: rename_file
run: |
TARGET_JAR="BasePlugin-${{ env.VERSION }}.jar"
TARGET_JAR="BasePlugin-${{ env.VERSION }}"
SOURCE_JAR=$(find run/plugins -name "*.jar" -print -quit)
mv "${SOURCE_JAR}" "${TARGET_JAR}"\
echo "FINAL_JAR=${TARGET_JAR}.jar" >> $GITHUB_ENV
echo "FINAL_JAR_NAME=${TARGET_JAR}" >> $GITHUB_ENV
mv "${SOURCE_JAR}" "${{ env.FINAL_JAR }}"\
- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: BasePlugin-${{ env.VERSION }}
path: BasePlugin-${{ env.VERSION }}.jar
name: ${{ env.FINAL_JAR_NAME }}
path: ${{ env.FINAL_JAR }}

- name: Upload JAR file
id: upload_file
run: |
gh release upload newest-build ${TARGET_JAR}
gh release upload newest-build ${{ env.FINAL_JAR }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

0 comments on commit b55ea57

Please sign in to comment.