From 58aa1bd18c533e18f9e19d48266f62416edefee9 Mon Sep 17 00:00:00 2001 From: Matt Dallmeyer Date: Fri, 27 Sep 2024 00:34:55 -0700 Subject: [PATCH] almost worked, skip steps instead of jobs (#22) --- .github/workflows/create-mod-release.yml | 42 ++++++++++++++++++++---- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/.github/workflows/create-mod-release.yml b/.github/workflows/create-mod-release.yml index b2e1933..e89718e 100644 --- a/.github/workflows/create-mod-release.yml +++ b/.github/workflows/create-mod-release.yml @@ -128,25 +128,30 @@ jobs: bundle_windows_build: name: "Bundle Windows Build" needs: build_windows_clang - if: ${{ !inputs.skipWindows && inputs.buildBinaries }} + if: ${{ always() }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + if: ${{ !inputs.skipWindows && inputs.buildBinaries }} with: ref: ${{ needs.create_release.outputs.new_tag }} - name: Prepare Artifact Folder + if: ${{ !inputs.skipWindows && inputs.buildBinaries }} run: mkdir -p ./ci-artifacts - uses: actions/download-artifact@v4 + if: ${{ !inputs.skipWindows && inputs.buildBinaries }} name: Download all Artifacts with: path: ./ci-artifacts/ - name: Display structure of downloaded files + if: ${{ !inputs.skipWindows && inputs.buildBinaries }} run: ls -Rl ./ci-artifacts/ - name: Prepare Windows Build Assets + if: ${{ !inputs.skipWindows && inputs.buildBinaries }} run: | mkdir -p ./ci-artifacts/windows ./scripts/create-mod-release/releases/extract_build_windows.sh ./ci-artifacts/windows ./ci-artifacts/windows-binary ./ @@ -154,6 +159,7 @@ jobs: 7z a -tzip ${{ inputs.outputDir }}/dist/windows-${TAG_VAL}.zip ./ci-artifacts/windows/* - name: Upload Bundle + if: ${{ !inputs.skipWindows && inputs.buildBinaries }} uses: actions/upload-artifact@v4 with: name: windows @@ -174,25 +180,30 @@ jobs: bundle_linux_build: name: "Bundle Linux Build" needs: build_linux_clang - if: ${{ !inputs.skipLinux && inputs.buildBinaries }} + if: ${{ always() }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + if: ${{ !inputs.skipLinux && inputs.buildBinaries }} with: ref: ${{ needs.create_release.outputs.new_tag }} - name: Prepare Artifact Folder + if: ${{ !inputs.skipLinux && inputs.buildBinaries }} run: mkdir -p ./ci-artifacts - uses: actions/download-artifact@v4 + if: ${{ !inputs.skipLinux && inputs.buildBinaries }} name: Download all Artifacts with: path: ./ci-artifacts/ - name: Display structure of downloaded files + if: ${{ !inputs.skipLinux && inputs.buildBinaries }} run: ls -Rl ./ci-artifacts/ - name: Prepare Linux Build Assets + if: ${{ !inputs.skipLinux && inputs.buildBinaries }} run: | mkdir -p ./ci-artifacts/linux ./scripts/create-mod-release/releases/extract_build_unix.sh ./ci-artifacts/linux ./ci-artifacts/linux-binary ./ @@ -200,6 +211,7 @@ jobs: 7z a -tzip ${{ inputs.outputDir }}/dist/linux-${TAG_VAL}.zip ./ci-artifacts/linux/* - name: Upload Bundle + if: ${{ !inputs.skipLinux && inputs.buildBinaries }} uses: actions/upload-artifact@v4 with: name: linux @@ -220,25 +232,30 @@ jobs: bundle_macos_build: name: "Bundle MacOS Build" needs: build_macos_intel - if: ${{ !inputs.skipMacOS && inputs.buildBinaries }} + if: ${{ always() }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + if: ${{ !inputs.skipMacOS && inputs.buildBinaries }} with: ref: ${{ needs.create_release.outputs.new_tag }} - name: Prepare Artifact Folder + if: ${{ !inputs.skipMacOS && inputs.buildBinaries }} run: mkdir -p ./ci-artifacts - uses: actions/download-artifact@v4 + if: ${{ !inputs.skipMacOS && inputs.buildBinaries }} name: Download all Artifacts with: path: ./ci-artifacts/ - name: Display structure of downloaded files + if: ${{ !inputs.skipMacOS && inputs.buildBinaries }} run: ls -Rl ./ci-artifacts/ - name: Prepare MacOS Build Assets + if: ${{ !inputs.skipMacOS && inputs.buildBinaries }} run: | mkdir -p ./ci-artifacts/macos-intel ./scripts/create-mod-release/releases/extract_build_unix.sh ./ci-artifacts/macos-intel ./ci-artifacts/macos-intel-binary ./ @@ -246,6 +263,7 @@ jobs: 7z a -tzip ${{ inputs.outputDir }}/dist/macos-intel-${TAG_VAL}.zip ./ci-artifacts/macos-intel/* - name: Upload Bundle + if: ${{ !inputs.skipMacOS && inputs.buildBinaries }} uses: actions/upload-artifact@v4 with: name: macos-intel @@ -257,13 +275,15 @@ jobs: bundle_windows_no_build: name: "Bundle Windows (no build)" needs: create_release - if: ${{ !inputs.skipWindows && !inputs.buildBinaries }} + if: ${{ always() }} runs-on: ubuntu-latest steps: - name: "Checkout Repository" + if: ${{ !inputs.skipWindows && !inputs.buildBinaries }} uses: actions/checkout@v4 - name: "Checkout Workflow Scripts" + if: ${{ !inputs.skipWindows && !inputs.buildBinaries }} uses: actions/checkout@v4 with: repository: "open-goal/mod-bundling-tools" @@ -271,6 +291,7 @@ jobs: path: "__actions/mod-bundling-tools" - name: "Create Windows Release" + if: ${{ !inputs.skipWindows && !inputs.buildBinaries }} env: outputDir: ${{ inputs.outputDir }} versionName: ${{ needs.create_release.outputs.bundleTagName }} @@ -279,6 +300,7 @@ jobs: run: python ./__actions/mod-bundling-tools/scripts/create-mod-release/bundle-windows.py - name: Upload Bundle + if: ${{ !inputs.skipWindows && !inputs.buildBinaries }} uses: actions/upload-artifact@v4 with: name: windows @@ -288,13 +310,15 @@ jobs: bundle_linux_no_build: name: "Bundle Linux (no build)" needs: create_release - if: ${{ !inputs.skipLinux && !inputs.buildBinaries }} + if: ${{ always() }} runs-on: ubuntu-latest steps: - name: "Checkout Repository" + if: ${{ !inputs.skipLinux && !inputs.buildBinaries }} uses: actions/checkout@v4 - name: "Checkout Workflow Scripts" + if: ${{ !inputs.skipLinux && !inputs.buildBinaries }} uses: actions/checkout@v4 with: repository: "open-goal/mod-bundling-tools" @@ -302,6 +326,7 @@ jobs: path: "__actions/mod-bundling-tools" - name: "Create Linux Release" + if: ${{ !inputs.skipLinux && !inputs.buildBinaries }} env: outputDir: ${{ inputs.outputDir }} versionName: ${{ needs.create_release.outputs.bundleTagName }} @@ -310,6 +335,7 @@ jobs: run: python ./__actions/mod-bundling-tools/scripts/create-mod-release/bundle-linux.py - name: Upload Bundle + if: ${{ !inputs.skipLinux && !inputs.buildBinaries }} uses: actions/upload-artifact@v4 with: name: linux @@ -319,13 +345,15 @@ jobs: bundle_macos_no_build: name: "Bundle macOS Intel (no build)" needs: create_release - if: ${{ !inputs.skipMacOS && !inputs.buildBinaries }} + if: ${{ always() }} runs-on: ubuntu-latest steps: - name: "Checkout Repository" + if: ${{ !inputs.skipMacOS && !inputs.buildBinaries }} uses: actions/checkout@v4 - name: "Checkout Workflow Scripts" + if: ${{ !inputs.skipMacOS && !inputs.buildBinaries }} uses: actions/checkout@v4 with: repository: "open-goal/mod-bundling-tools" @@ -333,6 +361,7 @@ jobs: path: "__actions/mod-bundling-tools" - name: "Create MacOS Intel Release" + if: ${{ !inputs.skipMacOS && !inputs.buildBinaries }} env: outputDir: ${{ inputs.outputDir }} versionName: ${{ needs.create_release.outputs.bundleTagName }} @@ -341,6 +370,7 @@ jobs: run: python ./__actions/mod-bundling-tools/scripts/create-mod-release/bundle-macos.py - name: Upload Bundle + if: ${{ !inputs.skipMacOS && !inputs.buildBinaries }} uses: actions/upload-artifact@v4 with: name: macos-intel