-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (60 loc) · 1.66 KB
/
controller.yml
File metadata and controls
67 lines (60 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Workflow Controller
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "**/Info.plist"
jobs:
# 1. Lint Swift code
lint:
uses: ./.github/workflows/1_lint.yml
secrets: inherit
# 2. Test iOS build
test:
needs: lint
uses: ./.github/workflows/2_test.yml
secrets: inherit
# 3. Build iOS project
# Outputs the project version for use in subsequent jobs
build:
needs: test
uses: ./.github/workflows/3_build.yml
secrets: inherit
# Set and validate project version
set-version:
runs-on: thevickypedia-default
needs: build
outputs:
project_version: ${{ steps.set-version.outputs.project_version }}
steps:
- name: Determine project version
id: set-version
run: |
echo "Resolving project version..."
PROJECT_VERSION="${{ needs.build.outputs.project_version }}"
if [[ -z "$PROJECT_VERSION" ]]; then
echo "ERROR: project_version must be set for push events"
exit 1
fi
echo "project_version=$PROJECT_VERSION" >> $GITHUB_OUTPUT
shell: bash
# 4. Create GitHub Release
# Outputs whether the release already exists
release:
needs: set-version
uses: ./.github/workflows/4_release.yml
with:
project_version: ${{ needs.set-version.outputs.project_version }}
secrets: inherit
# 5. Update Release Notes
release-notes:
needs:
- set-version
- release
if: ${{ needs.release.outputs.release_exists == 'false' }}
uses: ./.github/workflows/5_notes.yml
with:
project_version: ${{ needs.set-version.outputs.project_version }}
secrets: inherit