Skip to content

Commit 43e1253

Browse files
committed
Update release message
1 parent 61ff177 commit 43e1253

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ jobs:
6767
add-to-path: true
6868
link-to-sdk: true
6969

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-
7670
- name: Setup Android Signing
7771
if: startsWith(matrix.platform,'android')
7872
run: |
@@ -160,11 +154,12 @@ jobs:
160154
161155
- name: Get Branch
162156
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
165160
166161
- name: Upload
167-
if: env.BRANCH_NAME != 'main'
162+
if: env.BRANCH != 'main'
168163
uses: actions/upload-artifact@v4
169164
with:
170165
name: artifact
@@ -173,14 +168,14 @@ jobs:
173168
overwrite: true
174169

175170
- name: Release
176-
if: env.BRANCH_NAME == 'main'
171+
if: env.BRANCH == 'main'
177172
uses: softprops/action-gh-release@v2
178173
with:
179174
files: ./dist/*
180175
body_path: './release.md'
181176

182177
- name: Create Fdroid Source Dir
183-
if: env.BRANCH_NAME == 'main'
178+
if: env.BRANCH == 'main'
184179
run: |
185180
mkdir -p ./tmp
186181
cp ./dist/*android-arm64-v8a* ./tmp/ || true

0 commit comments

Comments
 (0)