From c811920b21eb40f9fc33eb4f0f940e23ef86fd69 Mon Sep 17 00:00:00 2001 From: nikitalita <69168929+nikitalita@users.noreply.github.com> Date: Mon, 17 Oct 2022 16:20:00 -0700 Subject: [PATCH] New Release automation (#83) * change to use our own release action * Change release to seperate job, run on tag creation * fix all_builds.yml * Update all_builds.yml * CI: Use forked action-gh-release instead --- .github/workflows/all_builds.yml | 49 +++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/.github/workflows/all_builds.yml b/.github/workflows/all_builds.yml index 7b643077..22a9b5fb 100644 --- a/.github/workflows/all_builds.yml +++ b/.github/workflows/all_builds.yml @@ -18,8 +18,6 @@ on: - "!.github/**" - ".github/actions/**" - ".github/workflows/all_builds.yml" - release: - types: ["created"] # Global Settings # SCONS_CACHE for windows must be set in the build environment @@ -201,19 +199,38 @@ jobs: path: ${{github.workspace}}/modules/gdsdecomp/standalone/.export/* retention-days: 90 - - name: Zip Release - continue-on-error: true - shell: pwsh + release: + if: startsWith(github.ref, 'refs/tags/') + runs-on: "ubuntu-20.04" + permissions: + contents: write + needs: build + steps: + - name: Download Linux artifact + uses: actions/download-artifact@v3 + with: + name: GDRE_tools-standalone-linux + path: artifacts/linux + - name: Download MacOS artifact + uses: actions/download-artifact@v3 + with: + name: GDRE_tools-standalone-macos + path: artifacts/macos + - name: Download Windows artifact + uses: actions/download-artifact@v3 + with: + name: GDRE_tools-standalone-windows + path: artifacts/windows + - name: Zip artifacts run: | - cd ${{github.workspace}}/modules/gdsdecomp/standalone/.export - 7z a "GDRE_tools-${{ github.event.release.tag_name }}-${{ matrix.platform }}.zip" * - if: github.event_name == 'release' - - - name: Upload to Release - uses: svenstaro/upload-release-action@v2 + ls -la artifacts/* + zip -r9 "artifacts/GDRE_tools-${{ github.ref_name }}-windows.zip" artifacts/windows/* + mv "artifacts/macos/gdre_tools.universal.zip" "artifacts/GDRE_tools-${{ github.ref_name }}-macos.zip" + zip -r9 "artifacts/GDRE_tools-${{ github.ref_name }}-linux.zip" artifacts/linux/* + - name: Release + uses: nikitalita/action-gh-release@v1.0 with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{github.workspace}}/modules/gdsdecomp/standalone/.export/GDRE_tools-${{ github.event.release.tag_name }}-${{ matrix.platform }}.zip - tag: ${{ github.ref }} - overwrite: true - if: github.event_name == 'release' + files: | + artifacts/GDRE_tools-${{ github.ref_name }}-windows.zip + artifacts/GDRE_tools-${{ github.ref_name }}-macos.zip + artifacts/GDRE_tools-${{ github.ref_name }}-linux.zip