Skip to content

Commit

Permalink
CI: Fix upload artifacts in pull request.
Browse files Browse the repository at this point in the history
  • Loading branch information
heiher committed Nov 24, 2024
1 parent c8b95eb commit ca2b471
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,18 @@ jobs:
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
yes | sdk/cmdline-tools/bin/sdkmanager --sdk_root=`pwd`/sdk --licenses
./gradlew assembleRelease
cp app/build/outputs/apk/release/hev.sockstun-*-release.apk hev.sockstun-${{ github.ref_name }}-release.apk
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
file_name="pr-${{ github.event.pull_request.number }}"
else
file_name="${{ github.ref_name }}"
fi
echo "file_name=${file_name}" >> $GITHUB_ENV
cp app/build/outputs/apk/release/hev.sockstun-*-release.apk hev.sockstun-${file_name}-release.apk
- name: Upload
uses: actions/upload-artifact@v4
with:
name: hev.sockstun-${{ github.ref_name }}-release.apk
path: hev.sockstun-${{ github.ref_name }}-release.apk
name: hev.sockstun-${{ env.file_name }}-release.apk
path: hev.sockstun-${{ env.file_name }}-release.apk
if-no-files-found: error
retention-days: 1

Expand Down

0 comments on commit ca2b471

Please sign in to comment.