File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change 67
67
add-to-path : true
68
68
link-to-sdk : true
69
69
70
- - name : Get Branch
71
- if : startsWith(matrix.platform,'linux')
72
- run : |
73
- echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
74
- echo "Current branch is ${{ env.BRANCH_NAME }}"
75
-
76
70
- name : Setup Android Signing
77
71
if : startsWith(matrix.platform,'android')
78
72
run : |
@@ -160,11 +154,12 @@ jobs:
160
154
161
155
- name : Get Branch
162
156
run : |
163
- echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
164
- echo "Current branch is ${{ env.BRANCH_NAME }}"
157
+ branch=$(git branch --contains ${{ github.ref_name }} | grep -v "detached" | sed 's/* //')
158
+ echo "Current branch is $branch"
159
+ echo "BRANCH=$branch" >> $GITHUB_ENV
165
160
166
161
- name : Upload
167
- if : env.BRANCH_NAME != 'main'
162
+ if : env.BRANCH != 'main'
168
163
uses : actions/upload-artifact@v4
169
164
with :
170
165
name : artifact
@@ -173,14 +168,14 @@ jobs:
173
168
overwrite : true
174
169
175
170
- name : Release
176
- if : env.BRANCH_NAME == 'main'
171
+ if : env.BRANCH == 'main'
177
172
uses : softprops/action-gh-release@v2
178
173
with :
179
174
files : ./dist/*
180
175
body_path : ' ./release.md'
181
176
182
177
- name : Create Fdroid Source Dir
183
- if : env.BRANCH_NAME == 'main'
178
+ if : env.BRANCH == 'main'
184
179
run : |
185
180
mkdir -p ./tmp
186
181
cp ./dist/*android-arm64-v8a* ./tmp/ || true
You can’t perform that action at this time.
0 commit comments