添加探索页的下拉刷新功能 #75
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: VersionCheck | |
on: | |
pull_request: | |
branches: [master, refactoring] | |
paths: | |
- app/src/** | |
- build.gradle.kts | |
- gradle.properties | |
- settings.gradle | |
jobs: | |
check-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Java 17 | |
uses: actions/[email protected] | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: Build with Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Get version from PR | |
id: get-pr-version | |
run: | | |
chmod +x ${{github.workspace}}/gradlew | |
echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew -q app:printVersionCode)" | |
- name: Get current version from main branch | |
id: get-current-version | |
run: | | |
git fetch origin refactoring | |
git checkout refactoring | |
chmod +x ./gradlew | |
echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew -q app:printVersionCode)" | |
- name: Compare versions | |
id: compare-versions | |
run: | | |
if [ ${{steps.get-pr-version.outputs.VERSION_NAME}} -le ${{steps.get-current-version.outputs.VERSION_NAME}} ] | |
then | |
echo "The version in the PR ${{steps.get-pr-version.outputs.VERSION_NAME}} is not higher than the current version ${{steps.get-current-version.outputs.VERSION_NAME}}." | |
echo "Please increase the debug version number." | |
exit 1 | |
fi |