This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
Kleine In-Game-UI Verbesserungen #685
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Requests | |
concurrency: | |
group: ${{ github.head_ref }} | |
cancel-in-progress: true | |
on: | |
pull_request_target: | |
types: | |
- synchronize | |
- opened | |
- labeled | |
branches-ignore: | |
- main | |
jobs: | |
change-detection: | |
uses: ./.github/workflows/change-detection.yml | |
unlabel-ready-to-merge: | |
name: Removes "ci-ready-to-merge" label on synchronize | |
if: github.event.action == 'synchronize' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions-ecosystem/action-remove-labels@v1 | |
with: | |
labels: ci-ready-to-merge | |
build-documentation: | |
name: Build the documentation | |
needs: change-detection | |
if: needs.change-detection.outputs.docs == 'true' | |
uses: ./.github/workflows/documentation.yml | |
with: | |
ref: "refs/pull/${{ github.event.number }}/merge" | |
lint: | |
name: Lint code base | |
needs: change-detection | |
if: needs.change-detection.outputs.unity == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: "refs/pull/${{ github.event.number }}/merge" | |
- uses: ./.github/actions/linter | |
fail-on-enabled-steam-integration: | |
name: Fail on enabled Steam integration | |
needs: change-detection | |
if: needs.change-detection.outputs.unity == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: "refs/pull/${{ github.event.number }}/merge" | |
- name: Check if Steam integration is enabled | |
shell: sh | |
working-directory: FairyTaleDefender/ProjectSettings | |
run: | | |
if egrep -q 'Standalone:(.*?)ENABLE_STEAM(.*?)$' ProjectSettings.asset; then | |
echo "PR is not valid due to enabled Steam integration. Please turn it off." | |
exit 1 | |
fi | |
build: | |
needs: [lint, fail-on-enabled-steam-integration, change-detection] | |
if: | | |
needs.change-detection.outputs.unity == 'true' | |
&& github.event.action == 'labeled' | |
&& contains(github.event.pull_request.labels.*.name, 'ci-reviewed') | |
name: Development Builds | |
uses: ./.github/workflows/build.yml | |
secrets: | |
UNITY_LICENSE: ${{ secrets.UNITY_PERSONAL_LICENSE }} | |
UNITY_EMAIL: ${{ secrets.UNITY_PERSONAL_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PERSONAL_PASSWORD }} | |
with: | |
do-test: true | |
fail-fast: true | |
ref: "refs/pull/${{ github.event.number }}/merge" | |
label-successful-build: | |
needs: [change-detection, build, build-documentation] | |
if: always() | |
name: Label successful build | |
runs-on: ubuntu-latest | |
steps: | |
- if: needs.change-detection.outputs.unity == 'true' && needs.build.result != 'success' | |
run: | | |
echo "Need successful build" | |
exit 1 | |
- uses: actions-ecosystem/action-add-labels@v1 | |
if: | | |
(needs.change-detection.outputs.unity == 'true' && needs.build.result == 'success') | |
|| (needs.change-detection.outputs.docs == 'true' && needs.build-documentation.result == 'success') | |
with: | |
labels: ci-ready-to-merge | |
unlabel-pr: | |
needs: build | |
name: Unlabel "ci-reviewed" PR | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions-ecosystem/action-remove-labels@v1 | |
with: | |
labels: ci-reviewed |