fix: update action to v4
This commit is contained in:
45
.github/workflows/build-release.yml
vendored
45
.github/workflows/build-release.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
|||||||
uses: android-actions/setup-android@v3
|
uses: android-actions/setup-android@v3
|
||||||
|
|
||||||
- name: Cache Gradle dependencies
|
- name: Cache Gradle dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.gradle/caches
|
~/.gradle/caches
|
||||||
@@ -119,14 +119,16 @@ jobs:
|
|||||||
echo "Module contents:"
|
echo "Module contents:"
|
||||||
unzip -l zygisk-myinjector-$VERSION.zip
|
unzip -l zygisk-myinjector-$VERSION.zip
|
||||||
|
|
||||||
|
# 重命名 APK 以包含版本号
|
||||||
|
cp configapp/build/outputs/apk/debug/configapp-debug.apk ./ConfigApp-$VERSION.apk
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag_name: ${{ github.event_name == 'push' && github.ref || github.event.inputs.version }}
|
tag_name: ${{ github.event_name == 'push' && github.ref || github.event.inputs.version }}
|
||||||
release_name: Release ${{ github.event_name == 'push' && github.ref || github.event.inputs.version }}
|
name: Release ${{ github.event_name == 'push' && github.ref || github.event.inputs.version }}
|
||||||
body: |
|
body: |
|
||||||
## Zygisk MyInjector Release
|
## Zygisk MyInjector Release
|
||||||
|
|
||||||
@@ -146,33 +148,6 @@ jobs:
|
|||||||
请查看 [commits](https://github.com/${{ github.repository }}/commits/${{ github.sha }})
|
请查看 [commits](https://github.com/${{ github.repository }}/commits/${{ github.sha }})
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
files: |
|
||||||
- name: Get version for upload
|
./zygisk-myinjector-*.zip
|
||||||
id: get_version
|
./ConfigApp-*.apk
|
||||||
run: |
|
|
||||||
if [ "${{ github.event_name }}" == "push" ]; then
|
|
||||||
VERSION="${GITHUB_REF#refs/tags/}"
|
|
||||||
else
|
|
||||||
VERSION="${{ github.event.inputs.version }}"
|
|
||||||
fi
|
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Upload Module
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./zygisk-myinjector-${{ steps.get_version.outputs.VERSION }}.zip
|
|
||||||
asset_name: zygisk-myinjector-${{ steps.get_version.outputs.VERSION }}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
|
||||||
- name: Upload ConfigApp APK
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./configapp/build/outputs/apk/debug/configapp-debug.apk
|
|
||||||
asset_name: ConfigApp-${{ steps.get_version.outputs.VERSION }}.apk
|
|
||||||
asset_content_type: application/vnd.android.package-archive
|
|
||||||
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
|||||||
uses: android-actions/setup-android@v3
|
uses: android-actions/setup-android@v3
|
||||||
|
|
||||||
- name: Cache Gradle dependencies
|
- name: Cache Gradle dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.gradle/caches
|
~/.gradle/caches
|
||||||
@@ -104,13 +104,15 @@ jobs:
|
|||||||
unzip -l zygisk-myinjector-ci.zip
|
unzip -l zygisk-myinjector-ci.zip
|
||||||
|
|
||||||
- name: Upload Module Artifact
|
- name: Upload Module Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: module-ci-${{ github.sha }}
|
name: module-ci-${{ github.sha }}
|
||||||
path: zygisk-myinjector-ci.zip
|
path: zygisk-myinjector-ci.zip
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
- name: Upload ConfigApp Artifact
|
- name: Upload ConfigApp Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: configapp-ci-${{ github.sha }}
|
name: configapp-ci-${{ github.sha }}
|
||||||
path: configapp/build/outputs/apk/debug/configapp-debug.apk
|
path: configapp/build/outputs/apk/debug/configapp-debug.apk
|
||||||
|
retention-days: 7
|
||||||
Reference in New Issue
Block a user