Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
almost worked, skip steps instead of jobs (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
dallmeyer authored Sep 27, 2024
1 parent 7bc4f1f commit 58aa1bd
Showing 1 changed file with 36 additions and 6 deletions.
42 changes: 36 additions & 6 deletions .github/workflows/create-mod-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,32 +128,38 @@ 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 ./
TAG_VAL=${{ needs.create_release.outputs.new_tag }}
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
Expand All @@ -174,32 +180,38 @@ 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 ./
TAG_VAL=${{ needs.create_release.outputs.new_tag }}
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
Expand All @@ -220,32 +232,38 @@ 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 ./
TAG_VAL=${{ needs.create_release.outputs.new_tag }}
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
Expand All @@ -257,20 +275,23 @@ 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"
ref: ${{ github.event.inputs.ref }}
path: "__actions/mod-bundling-tools"

- name: "Create Windows Release"
if: ${{ !inputs.skipWindows && !inputs.buildBinaries }}
env:
outputDir: ${{ inputs.outputDir }}
versionName: ${{ needs.create_release.outputs.bundleTagName }}
Expand All @@ -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
Expand All @@ -288,20 +310,23 @@ 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"
ref: ${{ github.event.inputs.ref }}
path: "__actions/mod-bundling-tools"

- name: "Create Linux Release"
if: ${{ !inputs.skipLinux && !inputs.buildBinaries }}
env:
outputDir: ${{ inputs.outputDir }}
versionName: ${{ needs.create_release.outputs.bundleTagName }}
Expand All @@ -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
Expand All @@ -319,20 +345,23 @@ 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"
ref: ${{ github.event.inputs.ref }}
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 }}
Expand All @@ -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
Expand Down

0 comments on commit 58aa1bd

Please sign in to comment.