@@ -3,42 +3,18 @@ name: Build pull request
3
3
on :
4
4
workflow_dispatch :
5
5
inputs :
6
- # Select pull request
7
6
pr-number :
8
- description : PR number (Without hashtag)
7
+ description : PR number
9
8
required : true
10
- # Select app flavor
11
9
app-flavor :
12
10
description : App flavor
13
- default : ' release'
11
+ default : release
14
12
type : choice
15
13
options :
16
14
- release
17
15
- debug
18
16
- profile
19
17
20
- # Flutter Configurations,
21
- # it's recommended to be set when you have problem regarding with flutter itself
22
- # For most part you do not need to change this.
23
-
24
- # Flutter version to use, note that the version had to exist in whether channel
25
- # to grab
26
- # Try using exact version or particular version on a specific branch instead of "any"
27
- flutter-channel :
28
- description : Flutter channel
29
- default : ' stable'
30
- type : choice
31
- options :
32
- - stable
33
- - beta
34
- - dev
35
- - any
36
- flutter-version :
37
- description : Flutter version
38
- default : ' 3.29.x'
39
-
40
- run-name : " Build pull request ${{ inputs.pr-number }}"
41
-
42
18
jobs :
43
19
build :
44
20
name : Build
@@ -62,76 +38,27 @@ jobs:
62
38
- name : Set up Flutter
63
39
uses : subosito/flutter-action@v2
64
40
with :
65
- channel : ${{ inputs.flutter-channel }}
66
- flutter-version : ${{ inputs.flutter-version }}
41
+ channel : stable
67
42
68
43
- name : Get dependencies
69
- continue-on-error : true
70
44
run : flutter pub get
71
45
72
46
- name : Generate translations
73
- continue-on-error : true
74
47
run : dart run slang
75
48
76
49
- name : Generate code files
77
- continue-on-error : true
78
50
run : dart run build_runner build --delete-conflicting-outputs
79
51
80
52
- name : Build
81
- continue-on-error : true
82
53
id : flutter-build
83
54
run : flutter build apk --${{ inputs.app-flavor }}
84
55
env :
85
56
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
86
57
87
- - name : Prepare comment
88
- id : prepare-comment # This should work now?
89
- run : |
90
- echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
91
- if [[ "${{ steps.flutter-build.outcome }}" == "success" ]]; then
92
- MESSAGE="✅ Succeeded build on $COMMIT_HASH."
93
- else
94
- MESSAGE="🚫 Failed build on $COMMIT_HASH."
95
- fi
96
-
97
- - name : " Comment on pull request #${{ inputs.pr-number }}"
98
- uses : thollander/actions-comment-pull-request@v3
99
- with :
100
- github-token : ${{ github.token }}
101
- pr-number : ${{ inputs.pr-number }}
102
- mode : recreate
103
- comment-tag : execution
104
- message : |
105
- ## ⚒️ Build status
106
-
107
- 🧪 Workflow triggered by: ${{ github.actor }}
108
-
109
- ${{ steps.prepare-comment.outputs.MESSAGE }}
110
-
111
- Details: [_Job execution **${{ github.run_id }}** / attempt **${{ github.run_attempt }}**_](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})!
112
-
113
- ### ⚙️ Workflow Steps
114
-
115
- | Step | Status |
116
- | :------------------------ | :------------------------------------------------------- |
117
- | **Get dependencies** | ${{ steps.get-dependencies.outcome || job.status }} |
118
- | **Generate translations** | ${{ steps.generate-translations.outcome || job.status }} |
119
- | **Generate code files** | ${{ steps.generate-code-files.outcome || job.status }} |
120
- | **Build** | ${{ steps.flutter-build.outcome }} |
121
-
122
- ### ⚙️ Workflow Configuration
123
-
124
- | Parameter | Value |
125
- | :--------------- | :--------------------------------------- |
126
- | App flavor | ${{ inputs.app-flavor }} |
127
- | Flutter version | ${{ inputs.flutter-version }} |
128
- | Flutter channel | ${{ inputs.flutter-channel }} |
129
-
130
- - name : Upload Artifact
58
+ - name : Upload artifacts
131
59
if : steps.flutter-build.outcome == 'success'
132
60
uses : actions/upload-artifact@v4
133
61
with :
134
- name : revanced-manager-(${{ env.COMMIT_HASH }}-${{ inputs.pr-number }}-${{ inputs.app-flavor }}-${{ inputs.flutter-version }})
62
+ name : revanced-manager-(${{ env.COMMIT_HASH }}
135
63
path : |
136
- build/app/outputs/flutter-apk/app-${{ inputs.app-flavor }}.apk
137
- build/app/outputs/flutter-apk/app-${{ inputs.app-flavor }}.apk.sha1
64
+ build/app/outputs/flutter-apk/app-*.apk
0 commit comments