Skip to content

Commit 610db42

Browse files
authored
Merge pull request #128 from nini22P/dev
v1.9.3
2 parents 33581a4 + 2f66e64 commit 610db42

53 files changed

Lines changed: 1656 additions & 57 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 95 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@ name: Deploy
22

33
on:
44
push:
5-
branches: ['main']
5+
branches:
6+
- main
7+
paths-ignore:
8+
- readme.md
9+
- readme_cn.md
10+
pull_request:
11+
paths-ignore:
12+
- readme.md
13+
- readme_cn.md
614

715
workflow_dispatch:
816

@@ -16,36 +24,116 @@ concurrency:
1624
cancel-in-progress: true
1725

1826
jobs:
19-
build:
27+
build-web:
28+
name: Build Web
2029
runs-on: windows-latest
2130
steps:
2231
- name: Checkout
23-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
2433
- name: Set up Node
25-
uses: actions/setup-node@v3
34+
uses: actions/setup-node@v4
2635
with:
2736
node-version: 18
2837
cache: 'npm'
2938
- name: Install dependencies
3039
run: npm install
3140
- name: Build
3241
env:
42+
ONEDRIVE_AUTH: ${{ secrets.ONEDRIVE_AUTH }}
43+
ONEDRIVE_GME: ${{ secrets.ONEDRIVE_GME }}
3344
CLIENT_ID: ${{ secrets.CLIENT_ID }}
3445
REDIRECT_URI: ${{ secrets.REDIRECT_URI }}
3546
run: npm run build
3647
- name: Upload artifact
3748
uses: actions/upload-pages-artifact@v2
3849
with:
3950
path: './dist'
51+
4052
deploy:
53+
if: ${{ github.ref == 'refs/heads/main' }}
54+
runs-on: ubuntu-latest
4155
environment:
4256
name: github-pages
4357
url: ${{ steps.deployment.outputs.page_url }}
44-
runs-on: ubuntu-latest
45-
needs: build
58+
needs: build-web
4659
steps:
4760
- name: Setup Pages
4861
uses: actions/configure-pages@v3
4962
- name: Deploy to GitHub Pages
5063
id: deployment
51-
uses: actions/deploy-pages@v2
64+
uses: actions/deploy-pages@v3
65+
66+
# build-android:
67+
# name: Build Android
68+
# runs-on: ubuntu-latest
69+
# steps:
70+
# - name: Clone repository
71+
# uses: actions/checkout@v4
72+
# - uses: actions/setup-java@v4
73+
# with:
74+
# distribution: 'temurin'
75+
# java-version: '21'
76+
# - name: Decode and save keystore
77+
# run: |
78+
# echo "${{ secrets.KEYSTORE }}" | base64 --decode > android/app/keystore.jks
79+
# - name: Save key.properties
80+
# run: |
81+
# echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/key.properties
82+
# echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
83+
# echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
84+
# echo "storeFile=keystore.jks" >> android/key.properties
85+
# - name: Grant execute permission for gradlew
86+
# run: chmod +x android/gradlew
87+
# - name: Build release apk
88+
# run: cd android && ./gradlew assembleRelease
89+
# - name: Rename APK
90+
# run: mv android/app/build/outputs/apk/release/app-release.apk OMP_android.apk
91+
# - name: Upload Android artifact
92+
# uses: actions/upload-artifact@v4
93+
# with:
94+
# name: OMP_android
95+
# path: OMP_android.apk
96+
97+
# release:
98+
# if: ${{ github.ref == 'refs/heads/main' }}
99+
# runs-on: ubuntu-latest
100+
# needs:
101+
# - build-web
102+
# - build-android
103+
# - deploy
104+
# steps:
105+
# - name: Checkout
106+
# uses: actions/checkout@v4
107+
# - name: Get version
108+
# id: yq
109+
# uses: mikefarah/yq@master
110+
# with:
111+
# cmd: yq -r '.version' package.json
112+
# - name: Print version
113+
# run: echo ${{ steps.yq.outputs.result }}
114+
# - name: Create Tag
115+
# id: create_tag
116+
# run: |
117+
# TAG_NAME="${{ steps.yq.outputs.result }}"
118+
# echo "TAG_NAME=$TAG_NAME" >> "$GITHUB_OUTPUT"
119+
# echo "Creating new tag $TAG_NAME..."
120+
# git tag "$TAG_NAME"
121+
# git push origin "$TAG_NAME"
122+
# - name: Eextract log
123+
# run: python extract_log.py ${{ steps.create_tag.outputs.TAG_NAME }}
124+
# - name: Download Android artifact
125+
# uses: actions/download-artifact@v4
126+
# with:
127+
# name: OMP_android
128+
# path: artifacts
129+
# - name: Release
130+
# uses: softprops/action-gh-release@v2
131+
# env:
132+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
133+
# with:
134+
# tag_name: ${{ steps.create_tag.outputs.TAG_NAME }}
135+
# body_path: CHANGELOG_${{ steps.create_tag.outputs.TAG_NAME }}.md
136+
# draft: false
137+
# prerelease: false
138+
# files: |
139+
# artifacts/OMP_android.apk

.github/workflows/pr-check.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)