Skip to content

Commit

Permalink
添加 Android 5 特别版与墨·状态栏特别版的 release 构建
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Dec 29, 2023
1 parent abd136f commit 2996d6b
Show file tree
Hide file tree
Showing 7 changed files with 230 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runs:
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '17'
java-version: ${{ env.JAVA_VERSION }}
cache: gradle

- name: Cache node modules
Expand Down
78 changes: 73 additions & 5 deletions .github/workflows/beta-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Env
uses: ./.github/actions/setup
env:
JAVA_VERSION: '17'

- name: Build Packages
run: |
cd android
echo ${{ secrets.KEYSTORE_STORE_FILE_BASE64 }} | base64 --decode > app/${{ secrets.KEYSTORE_STORE_FILE }}
./gradlew assembleRelease -PMYAPP_UPLOAD_STORE_FILE='${{ secrets.KEYSTORE_STORE_FILE }}' -PMYAPP_UPLOAD_KEY_ALIAS='${{ secrets.KEYSTORE_KEY_ALIAS }}' -PMYAPP_UPLOAD_STORE_PASSWORD='${{ secrets.KEYSTORE_PASSWORD }}' -PMYAPP_UPLOAD_KEY_PASSWORD='${{ secrets.KEYSTORE_KEY_PASSWORD }}'
uses: ./.github/actions/build-packages

# Push tag to GitHub if package.json version's tag is not tagged
- name: Get package version
Expand All @@ -35,3 +34,72 @@ jobs:
uses: ./.github/actions/upload-artifact
env:
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}


Android_SL:
name: Android_SL
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v4
with:
ref: statusbar_lyric

- name: Setup Env
uses: ./.github/actions/setup
env:
JAVA_VERSION: '17'

- name: Build Packages
uses: ./.github/actions/build-packages

# Push tag to GitHub if package.json version's tag is not tagged
- name: Get package version
run: |
node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
echo "COMMIT_SHA=$(git show -s --format=%H)" >> $GITHUB_ENV
- name: Generate file MD5
run: |
echo "current commit sha: ${{ env.COMMIT_SHA }}"
cd android/app/build/outputs/apk/release
md5sum *.apk
- name: Upload Artifact
uses: ./.github/actions/upload-artifact
env:
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}

Android_5:
name: Android_5
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v4
with:
ref: android_5

- name: Setup Env
uses: ./.github/actions/setup
env:
JAVA_VERSION: '11'

- name: Build Packages
uses: ./.github/actions/build-packages

# Push tag to GitHub if package.json version's tag is not tagged
- name: Get package version
run: |
node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
echo "COMMIT_SHA=$(git show -s --format=%H)" >> $GITHUB_ENV
- name: Generate file MD5
run: |
echo "current commit sha: ${{ env.COMMIT_SHA }}"
cd android/app/build/outputs/apk/release
md5sum *.apk
- name: Upload Artifact
uses: ./.github/actions/upload-artifact
env:
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
138 changes: 129 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Env
uses: ./.github/actions/setup
env:
JAVA_VERSION: '17'

- name: Build Packages
uses: ./.github/actions/build-packages
Expand All @@ -34,10 +36,123 @@ jobs:

- name: Generate file MD5
run: |
echo -e '\n### File MD5\n```' >> ./publish/changeLog.md
cd android/app/build/outputs/apk/release
md5sum *.apk >> ../../../../../../publish/changeLog.md
echo -e '```\n' >> ../../../../../../publish/changeLog.md
md5sum *.apk
- name: Upload Artifact
uses: ./.github/actions/upload-artifact
env:
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}

Android_SL:
name: Android_SL
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v4
with:
ref: statusbar_lyric

- name: Setup Env
uses: ./.github/actions/setup
env:
JAVA_VERSION: '17'

- name: Build Packages
uses: ./.github/actions/build-packages

# Push tag to GitHub if package.json version's tag is not tagged
- name: Get package version
run: |
node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
echo "COMMIT_SHA=$(git show -s --format=%H)" >> $GITHUB_ENV
- name: Create git tag
uses: pkgdeps/git-tag-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repo: ${{ github.repository }}
version: ${{ env.PACKAGE_VERSION }}
git_commit_sha: ${{ env.COMMIT_SHA }}
git_tag_prefix: "v"

- name: Generate file MD5
run: |
echo "current commit sha: ${{ env.COMMIT_SHA }}"
cd android/app/build/outputs/apk/release
md5sum *.apk
- name: Upload Artifact
uses: ./.github/actions/upload-artifact
env:
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}

Android_5:
name: Android_5
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v4
with:
ref: android_5

- name: Setup Env
uses: ./.github/actions/setup
env:
JAVA_VERSION: '11'

- name: Build Packages
uses: ./.github/actions/build-packages

# Push tag to GitHub if package.json version's tag is not tagged
- name: Get package version
run: |
node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
echo "COMMIT_SHA=$(git show -s --format=%H)" >> $GITHUB_ENV
- name: Create git tag
uses: pkgdeps/git-tag-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_repo: ${{ github.repository }}
version: ${{ env.PACKAGE_VERSION }}
git_commit_sha: ${{ env.COMMIT_SHA }}
git_tag_prefix: "v"

- name: Generate file MD5
run: |
echo "current commit sha: ${{ env.COMMIT_SHA }}"
cd android/app/build/outputs/apk/release
md5sum *.apk
- name: Upload Artifact
uses: ./.github/actions/upload-artifact
env:
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}

Release:
name: Release
runs-on: ubuntu-latest
needs: [Android, Android_SL, Android_5]
steps:
- name: Check out git repository
uses: actions/checkout@v4

- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
merge-multiple: true

- name: Generate file MD5
run: |
echo -e '\n### File MD5\n```' >> ./publish/changeLog.md
cd artifacts
md5sum *.apk >> ../publish/changeLog.md
echo -e '```\n' >> ../publish/changeLog.md
- name: Get package version
run: node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV

- name: Release
uses: softprops/action-gh-release@v1
Expand All @@ -52,10 +167,15 @@ jobs:
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-x86_64.apk
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-x86.apk
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-universal.apk
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-android_5-arm64-v8a.apk
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-android_5-armeabi-v7a.apk
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-android_5-x86_64.apk
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-android_5-x86.apk
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-android_5-universal.apk
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-sl-arm64-v8a.apk
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-sl-armeabi-v7a.apk
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-sl-x86_64.apk
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-sl-x86.apk
android/app/build/outputs/apk/release/lx-music-mobile-v${{ env.PACKAGE_VERSION }}-sl-universal.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Artifact
uses: ./.github/actions/upload-artifact
env:
PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }}
4 changes: 0 additions & 4 deletions .ncurc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
module.exports = {
upgrade: true,
reject: [
// 'metro-react-native-babel-preset',
'@types/react-native',
'metro-react-native-babel-preset',
'@react-native/metro-config',
'react',
],

// target: 'patch',
// filter: [
// '@types/react-native',
// 'react',
// 'metro-react-native-babel-preset',
// '@react-native/metro-config',
// ],
}
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2996d6b

Please sign in to comment.