Skip to content

Commit

Permalink
ci: update build Action file
Browse files Browse the repository at this point in the history
ci: fix bug in build yml

ci: fix bug in GitHub Action yml

ci: change format of commit message

ci: commit message get

ci: try to fix bug in getting commit message

ci: update format of commit message
  • Loading branch information
Suisuroru committed Jan 20, 2025
1 parent 8a93796 commit f0d41f4
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/auto_build_jar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ jobs:
body: |
此预发布版本由Github Action自动构建。
请注意,此版本为测试版,并不代表最终版本。
### 最后一次提交信息
#### 提交SHA:
${{ github.sha }}
#### 提交消息:
${{ github.event.head_commit.message }}
draft: false
prerelease: true
continue-on-error: true
Expand Down Expand Up @@ -87,12 +92,23 @@ jobs:
- name: Build with Gradle
run: ./gradlew shadowJar

- name: Rename and Upload JAR file
id: rename_and_upload
- 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}"
gh release upload newest-build ${TARGET_JAR}
echo "FINAL_JAR_NAME=${TARGET_JAR}" >> $GITHUB_ENV
mv "${SOURCE_JAR}" "${TARGET_JAR}.jar"
- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.FINAL_JAR_NAME }}
path: ${{ env.FINAL_JAR_NAME }}.jar

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

0 comments on commit f0d41f4

Please sign in to comment.