diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7ff9266 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: Release + +on: + push: + tags: ['v*'] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + - uses: android-actions/setup-android@v3 + with: + packages: 'platforms;android-35 build-tools;35.0.0' + - name: Decode Keystore + run: echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > release.jks + - name: Build Release APK + run: | + chmod +x gradlew + ./gradlew assembleRelease + - name: Rename & Release + run: | + cp app/build/outputs/apk/release/app-release.apk "RainyToken-${GITHUB_REF#refs/tags/}.apk" + - uses: softprops/action-gh-release@v2 + with: + name: "🎉 RainyToken ${{ github.ref_name }}" + files: RainyToken-${{ github.ref_name }}.apk + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index 03d1fb0..5ef3f11 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -# 雨晴Token +# 🌧️ 雨晴Token (RainyToken) + +> *"AI 用量,尽在掌握"* 🐱✨ + +[![Release](https://github.com/CATMIAOZHI/Rainytoken/actions/workflows/release.yml/badge.svg)](https://github.com/CATMIAOZHI/Rainytoken/actions) +[![Version](https://img.shields.io/github/v/release/CATMIAOZHI/Rainytoken?color=ff85a2)](https://github.com/CATMIAOZHI/Rainytoken/releases) Android AI 余额查询 APP —— 统一查看 DeepSeek 和 OpenCode Go 的余额/配额。