Update build.yml (#5831)
This commit is contained in:
1 parent
226b36903e
commit
42c12fdef4
1 file changed
+34
-8
@@ -10,6 +10,9 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -119,11 +122,34 @@ jobs:
|
|||||||
name: x86-apk
|
name: x86-apk
|
||||||
path: ${{ github.workspace }}/V2rayNG/app/build/outputs/apk/*/release/*x86*.apk
|
path: ${{ github.workspace }}/V2rayNG/app/build/outputs/apk/*/release/*x86*.apk
|
||||||
|
|
||||||
- name: Upload to release
|
sign-and-release:
|
||||||
uses: svenstaro/upload-release-action@v2
|
needs: build
|
||||||
if: github.event.inputs.release_tag != ''
|
runs-on: ubuntu-26.04
|
||||||
with:
|
if: github.event_name == 'workflow_dispatch' && inputs.release_tag != ''
|
||||||
file: ${{ github.workspace }}/V2rayNG/app/build/outputs/apk/*/release/*.apk
|
|
||||||
tag: ${{ github.event.inputs.release_tag }}
|
steps:
|
||||||
file_glob: true
|
- name: Download APK artifacts
|
||||||
prerelease: true
|
uses: actions/download-artifact@v8
|
||||||
|
with:
|
||||||
|
path: release
|
||||||
|
|
||||||
|
- name: Sign APK files
|
||||||
|
run: |
|
||||||
|
printf '%s' "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
|
||||||
|
KEY=$(gpg --list-secret-keys --with-colons | awk -F: '/^fpr:/ {print $10; exit}')
|
||||||
|
mkdir -p release-files
|
||||||
|
|
||||||
|
find release -type f -name '*.apk' | while read apk; do
|
||||||
|
cp "$apk" release-files/
|
||||||
|
gpg --batch --yes --local-user "$KEY" --detach-sign --output "release-files/$(basename "$apk").sig" "$apk"
|
||||||
|
done
|
||||||
|
|
||||||
|
gpg --armor --export "$KEY" > release-files/v2rayNG-public-key.asc
|
||||||
|
|
||||||
|
- name: Upload APKs, signatures and public key to release
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
file: release-files/*
|
||||||
|
tag: ${{ inputs.release_tag }}
|
||||||
|
file_glob: true
|
||||||
|
prerelease: true
|
||||||
Reference in new issue
Block a user