Skip to content

Commit

Permalink
ci: Avoid duplicate builds per website
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Oct 23, 2024
1 parent fdb5f5f commit 0fd794f
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
outputs:
ref: v${{ steps.bump-version.outputs.version }}
version: ${{ steps.bump-version.outputs.version }}
matrix: ${{ steps.set-matrix.outputs.result }}
build-matrix: ${{ steps.set-build-matrix.outputs.result }}
publish-matrix: ${{ steps.set-publish-matrix.outputs.result }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -50,8 +51,16 @@ jobs:
# shell: bash
# env:
# BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
- name: Preparing matrix
id: set-matrix
- name: Preparing build matrix
id: set-build-matrix
uses: actions/github-script@v7
with:
script: |
return {
loader: [${{inputs.fabric}} ? 'fabric' : false, ${{inputs.forge}} ? 'forge' : false, ${{inputs.neoforge}} ? 'neoforge' : false].filter(Boolean),
}
- name: Preparing publish matrix
id: set-publish-matrix
uses: actions/github-script@v7
with:
script: |
Expand All @@ -66,7 +75,7 @@ jobs:
build-release:
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJson(needs.create-release.outputs.matrix)}}
matrix: ${{fromJson(needs.create-release.outputs.build-matrix)}}
fail-fast: false
steps:
- name: Checkout repository
Expand All @@ -91,7 +100,7 @@ jobs:
publish-release:
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJson(needs.create-release.outputs.matrix)}}
matrix: ${{fromJson(needs.create-release.outputs.publish-matrix)}}
fail-fast: false
steps:
- name: Checkout repository
Expand Down

0 comments on commit 0fd794f

Please sign in to comment.