Skip to content

Commit

Permalink
restrict more steps to only run during publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
Erdragh committed Oct 11, 2023
1 parent b5a7e6d commit 56815c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
java: [
17, # Current Java LTS & minimum supported by Minecraft
]
# and run on both Linux and Windows
os: [ubuntu-22.04, windows-2022]
# and run on both Linux and macOS
os: [ubuntu-latest, macos-latest]

runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
run: ./gradlew clean build

- name: extract changelog
if: ${{ runner.os != 'Windows' }}
if: ${{ runner.os == 'Linux' && matrix.java == '17' && github.event.inputs.publish }} # only publish from one OS with latest Java
id: getchangelog
env:
VERSION_NAME: ${{ steps.getversion.outputs.version }}
Expand All @@ -78,11 +78,11 @@ jobs:
# echo is not set, which it will never be, because it's
# only set for Linux
- name: show version
if: ${{ runner.os != 'Windows' }}
if: ${{ runner.os == 'Linux' && matrix.java == '17' && github.event.inputs.publish }} # only publish from one OS with latest Java
run: echo ${{ steps.getversion.outputs.version }}

- name: show changelog
if: ${{ runner.os != 'Windows' }}
if: ${{ runner.os == 'Linux' && matrix.java == '17' && github.event.inputs.publish }} # only publish from one OS with latest Java
run: echo "${{ steps.getchangelog.outputs.changelog }}"
continue-on-error: true

Expand Down

0 comments on commit 56815c1

Please sign in to comment.