From 7edd917c3ff24a45282458503f0b6882e30390a5 Mon Sep 17 00:00:00 2001 From: ShrBox Date: Thu, 16 Jan 2025 19:47:55 +0800 Subject: [PATCH] ci: update release --- .github/workflows/build.yml | 16 ++++++++++---- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++-------- CHANGELOG.md | 12 +++++++++++ 3 files changed, 55 insertions(+), 13 deletions(-) create mode 100644 CHANGELOG.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60e9a2c..f8962bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ on: pull_request: push: workflow_dispatch: - + jobs: build: runs-on: windows-latest @@ -10,7 +10,15 @@ jobs: - uses: actions/checkout@v4 - uses: xmake-io/github-action-setup-xmake@v1 - + + - uses: actions/cache@v4 + with: + path: | + ~/AppData/Local/.xmake + key: xmake-${{ hashFiles('xmake.lua') }} + restore-keys: | + xmake- + - run: | xmake repo -u @@ -18,9 +26,9 @@ jobs: xmake f -a x64 -m release -p windows -v -y - run: | - xmake -w -y + xmake -v -y - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }} path: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e4fed2..6c9b16d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,43 +11,65 @@ jobs: - uses: xmake-io/github-action-setup-xmake@v1 + - uses: actions/cache@v4 + with: + path: | + ~/AppData/Local/.xmake + key: xmake-${{ hashFiles('xmake.lua') }} + restore-keys: | + xmake- + - run: | xmake repo -u - run: | - xmake f -a x64 -m release -p windows -v -y + xmake f -a x64 -m release -p windows -y - run: | xmake -w -y - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }} path: | bin/ + update-release-notes: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - id: extract-release-notes + uses: ffurrer2/extract-release-notes@v2 + + - uses: softprops/action-gh-release@v1 + with: + body: | + ${{ steps.extract-release-notes.outputs.release_notes }} + upload-to-release: needs: - build + - update-release-notes permissions: contents: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: ${{ github.event.repository.name }}-windows-x64-${{ github.sha }} - path: release/ + path: artifact - run: | - cp LICENSE README.md release/ + cp CHANGELOG.md LICENSE README.md artifact/ - - name: Archive release - run: | - cd release + - run: | zip -r ../${{ github.event.repository.name }}-windows-x64.zip * - cd .. + working-directory: artifact - name: Calculate SHA256 id: calculate-sha256 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..376d3a0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,12 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/) +and this project adheres to [Semantic Versioning](https://semver.org/). + +## [0.9.0-rc.4] - 2025-01-12 + +- Support LeviLamina 1.0.0-rc.3 + +[0.9.0-rc.4]: https://github.com/LiteLDev/LegacyMoney/releases/tag/v0.9.0-rc.4