Cleaned up task 'on release' restrictions to be on job level

This commit is contained in:
Yair Morgenstern 2023-03-08 12:11:38 +02:00
parent cd40aa7653
commit 9ebe1370b5

View File

@ -55,7 +55,6 @@ jobs:
id: tag
uses: dawidd6/action-get-tag@v1
- name: Read release.md and use it as a body of new release. This will fail for patch releases, since they have no readme.
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
@ -84,6 +83,8 @@ jobs:
./gradlew desktop:zipLinuxFilesForJar
- name: Upload JAR
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v3
with:
name: UncivJar
@ -91,6 +92,8 @@ jobs:
desktop/build/libs/Unciv.jar
- name: Upload linux files
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v3
with:
name: UncivLinuxFiles
@ -106,6 +109,8 @@ jobs:
./gradlew server:dist
- name: Upload Server
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v3
with:
name: UncivServer
@ -115,6 +120,7 @@ jobs:
android-build:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
continue-on-error: true
runs-on: ubuntu-latest
needs: build
steps:
@ -129,8 +135,6 @@ jobs:
uses: gradle/gradle-build-action@v2.3.3
- name: Prepare .aab (for Google Play) and .apk (for Github) files
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
shell: bash
run: |
mkdir whatsNewDirectory
@ -140,7 +144,6 @@ jobs:
- name: Sign AAB for Google Play upload
uses: r0adkll/sign-android-release@v1
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
with:
releaseDirectory: android/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.BUNDLE_SIGNING_KEY_BASE64 }}
@ -149,8 +152,6 @@ jobs:
keyPassword: ${{ secrets.BUNDLE_SIGNING_KEY_PASSWORD }}
- name: Upload AAB to google play
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
continue-on-error: true
uses: r0adkll/upload-google-play@v1.0.15
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
@ -163,8 +164,6 @@ jobs:
- name: Sign APK for Github upload
uses: r0adkll/sign-android-release@v1
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
with:
releaseDirectory: android/build/outputs/apk/release
signingKeyBase64: ${{ secrets.BUNDLE_SIGNING_KEY_BASE64 }}
@ -174,8 +173,6 @@ jobs:
- name: Move APK to deploy folder
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
shell: bash
run: |
mv android/build/outputs/apk/release/Unciv-release-unsigned-signed.apk Unciv-signed.apk
@ -242,8 +239,6 @@ jobs:
run: ls -R
- name: Packr build
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: |
mkdir -p desktop/build/libs
mv Unciv.jar desktop/build/libs
@ -266,6 +261,8 @@ jobs:
Upload-to-itch:
runs-on: ubuntu-latest
needs: packr-build
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- name: Download packed zips
@ -274,8 +271,6 @@ jobs:
name: UncivDeploymentZips
- name: Upload to itch.io
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
run: |
@ -289,6 +284,8 @@ jobs:
Upload-to-steam:
runs-on: ubuntu-latest
needs: packr-build
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- name: Download packed zips
@ -297,8 +294,6 @@ jobs:
name: UncivDeploymentZips
- name: Unzip zips for steam deployment
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
shell: bash
run: |
mkdir steam
@ -306,8 +301,6 @@ jobs:
unzip Unciv-Linux64.zip -d steam/Unciv-Linux64
- name: Steam deploy
continue-on-error: true
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: game-ci/steam-deploy@v1
with:
username: ${{ secrets.STEAM_USERNAME }}
@ -324,6 +317,7 @@ jobs:
Finalize:
needs: [build, android-build, packr-build]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
@ -367,7 +361,7 @@ jobs:
- name: Post announcement on Discord
continue-on-error: true
## On patch releases, don't notify Discord
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && needs.build.outputs.release_body != ''
if: needs.build.outputs.release_body != ''
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@0.3.2