From b1a5550574927ce68f06737c8a70132a21fd732b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20V=C6=B0=C6=A1ng?= Date: Fri, 5 Apr 2024 13:02:20 +0700 Subject: [PATCH] add release step in github action --- .github/workflows/auto-build.yml | 28 ++++++++++++++++++++-------- download.py | 4 ++-- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/auto-build.yml b/.github/workflows/auto-build.yml index c1ee578..2feaa8a 100644 --- a/.github/workflows/auto-build.yml +++ b/.github/workflows/auto-build.yml @@ -4,6 +4,9 @@ on: push: branches: ["main"] +permissions: + contents: write + jobs: auto-build: name: Auto build Aseprite for Windows x64 @@ -31,12 +34,12 @@ jobs: with: arch: x64 - # - name: Build Aseprite - # run: | - # mkdir build - # cd build - # cmake "../src/aseprite" -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DLAF_BACKEND=skia -DSKIA_DIR="../src/skia" -DSKIA_LIBRARY_DIR="../src/skia/out/Release-x64" -DSKIA_LIBRARY="../src/skia/out/Release-x64/skia.lib" - # ninja aseprite + - name: Build Aseprite + run: | + mkdir build + cd build + cmake "../src/aseprite" -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DLAF_BACKEND=skia -DSKIA_DIR="../src/skia" -DSKIA_LIBRARY_DIR="../src/skia/out/Release-x64" -DSKIA_LIBRARY="../src/skia/out/Release-x64/skia.lib" + ninja aseprite - name: Get version id: get_version @@ -44,6 +47,15 @@ jobs: $version = Get-Content version.txt echo "version=$version" >> $env:GITHUB_OUTPUT - - name: Test version + - name: Zip Aseprite run: | - echo "Version: ${{ steps.get_version.outputs.version }}" + cd build/bin + 7z a ../../Aseprite-Windows-x64-${{ steps.get_version.outputs.version }}.zip * + + - name: GH Release + uses: softprops/action-gh-release@v2.0.4 + with: + name: Aseprite-Windows-x64-${{ steps.get_version.outputs.version }} + tag_name: ${{ steps.get_version.outputs.version }} + files: | + Aseprite-Windows-x64-${{ steps.get_version.outputs.version }}.zip diff --git a/download.py b/download.py index e7bbc78..713aca1 100644 --- a/download.py +++ b/download.py @@ -38,8 +38,8 @@ def download_skia_for_windows(tag): if __name__ == '__main__': aseprite_tag = get_latest_tag_aseprite() - #clone_aseprite(aseprite_tag) + clone_aseprite(aseprite_tag) save_aseprite_tag(aseprite_tag) skia_tag = get_latest_tag_skia() - #download_skia_for_windows(skia_tag) \ No newline at end of file + download_skia_for_windows(skia_tag) \ No newline at end of file