-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4385b0e
commit 460eb92
Showing
9 changed files
with
4,372 additions
and
95 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Android build | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Get npm cache directory | ||
id: npm-cache | ||
run: | | ||
echo "::set-output name=dir::$(npm config get cache)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.npm-cache.outputs.dir }} | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- name: build | ||
working-directory: ./ | ||
run: | | ||
cd frontend | ||
npm ci | ||
npm run build:android | ||
cd ../ | ||
cd android | ||
npm ci | ||
npm run build:front | ||
npm run build:action | ||
- name: set asset_path env | ||
run: | | ||
ls -lah android/dist | ||
asset_path=$(ls ./android\/dist/*.apk) | ||
asset_name=${asset_path#*android\/dist/} | ||
echo "::set-env name=ASSET_PATH::${asset_path}" | ||
echo "::set-env name=ASSET_NAME::${asset_name}" | ||
- name: Upload apk | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: ${{ env.ASSET_NAME }} | ||
path: ${{ env.ASSET_PATH }} |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Remove old artifacts | ||
|
||
on: | ||
schedule: | ||
- cron: "1 1 1 * *" | ||
|
||
jobs: | ||
remove-old-artifacts: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- name: Remove old artifacts | ||
uses: c-hive/gha-remove-artifacts@v1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
age: "1 month" | ||
skip-tags: false | ||
skip-recent: 3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
# High Music | ||
|
||
使用 [androidjs](https://github.com/android-js/androidjs) 构建的 安卓应用 | ||
|
||
## Build | ||
|
||
```bash | ||
$ androidjs b | ||
npm run build | ||
``` | ||
|
||
## 已知问题 | ||
|
||
- 无法后台播放 [issue](https://github.com/android-js/androidjs/issues/207) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const noop = () => {}; | ||
|
||
process.stdout.clearLine = noop; | ||
process.stdout.cursorTo = noop; | ||
|
||
require("androidjs-builder/bin.js"); |
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
Oops, something went wrong.