From 92243972ec6bf52e94c8325a8a328cb9866b25df Mon Sep 17 00:00:00 2001 From: CrystalNeko <135438028+CSneko@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:49:59 +0800 Subject: [PATCH] Create releases.yml --- .github/workflows/releases.yml | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/releases.yml diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml new file mode 100644 index 00000000..4b5604be --- /dev/null +++ b/.github/workflows/releases.yml @@ -0,0 +1,39 @@ +name: Publish Release Artifacts + +on: + release: + types: [created] + +jobs: + build-and-upload: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '21' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + + - name: Run DataGenera + run: ./gradlew runDatagen + + - name: Build + run: ./gradlew build + + - name: Upload Release Assets + uses: softprops/action-gh-release@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag_name: ${{ github.event.release.tag_name }} + name: ${{ github.event.release.tag_name }} 更新 + body: 发布 ${{ github.event.release.tag_name }} + files: | + build/libs/* + generate_notes: true