From 88d7136fe999a59efc01df51daa3af034b1fd442 Mon Sep 17 00:00:00 2001 From: violet-dev Date: Sun, 4 Aug 2024 10:25:14 +0900 Subject: [PATCH] Update workflows --- .github/workflows/violet-build.yml | 18 +++++++++--------- .github/workflows/violet-sync.yml | 7 +++---- .github/workflows/violet-test.yml | 6 +++--- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/violet-build.yml b/.github/workflows/violet-build.yml index 572d6f75b..e881e0879 100644 --- a/.github/workflows/violet-build.yml +++ b/.github/workflows/violet-build.yml @@ -12,6 +12,9 @@ on: jobs: format: runs-on: ubuntu-latest + defaults: + run: + working-directory: violet steps: - uses: actions/checkout@v2 with: @@ -29,11 +32,9 @@ jobs: - uses: dtolnay/rust-toolchain@stable - name: Formatting - working-directory: violet run: dart format --output=none --set-exit-if-changed . - name: Preprocess - working-directory: violet run: | cd lib/server wget -q ${{ secrets.SECRET_SALT }} || echo 'String getValid(String vToken) { return vToken; }' > salt.dart @@ -45,6 +46,9 @@ jobs: ios-build: runs-on: macos-latest needs: [format] + defaults: + run: + working-directory: violet steps: - uses: actions/checkout@v2 with: @@ -62,7 +66,6 @@ jobs: - uses: dtolnay/rust-toolchain@stable - name: Preprocess - working-directory: violet run: | cd lib/server wget -q ${{ secrets.SECRET_SALT }} || echo 'String getValid(String vToken) { return vToken; }' > salt.dart @@ -71,7 +74,6 @@ jobs: python3 preprocess-ios.py - name: Podfile - working-directory: violet run: | cd ios rm Podfile.lock @@ -82,7 +84,6 @@ jobs: cd .. - name: Build - working-directory: violet run: | flutter build ios --release --no-codesign mkdir -p Payload @@ -91,7 +92,6 @@ jobs: mv Payload.zip Payload.ipa - name: Upload IPA - working-directory: violet uses: actions/upload-artifact@v2 with: name: ipa-build @@ -100,6 +100,9 @@ jobs: android-build: runs-on: ubuntu-latest needs: [format] + defaults: + run: + working-directory: violet steps: - uses: actions/checkout@v2 with: @@ -120,7 +123,6 @@ jobs: - uses: dtolnay/rust-toolchain@stable - name: Preprocess - working-directory: violet run: | cd lib/server wget -q ${{ secrets.SECRET_SALT }} || echo 'String getValid(String vToken) { return vToken; }' > salt.dart @@ -129,13 +131,11 @@ jobs: python3 preprocess-android.py - name: Build - working-directory: violet run: | flutter clean flutter build apk --release - name: Upload APK - working-directory: violet uses: actions/upload-artifact@v2 with: name: apk-build diff --git a/.github/workflows/violet-sync.yml b/.github/workflows/violet-sync.yml index a5fd44dd3..90c102291 100644 --- a/.github/workflows/violet-sync.yml +++ b/.github/workflows/violet-sync.yml @@ -8,6 +8,9 @@ on: jobs: sync-job: runs-on: ubuntu-latest + defaults: + run: + working-directory: violet steps: # # Setup @@ -32,17 +35,14 @@ jobs: # Sync # - name: Install Requirements - working-directory: violet run: pip3 install -r script/requirements.txt - name: Sync Main - working-directory: violet run: | python3 script/daily-crop.py python3 script/daily-bookmark.py - name: Compress - working-directory: violet uses: montudor/action-zip@v1 with: args: zip -qq -r assets/daily.zip assets/daily @@ -51,7 +51,6 @@ jobs: # Update # - name: Revision - working-directory: violet run: | git checkout -b sync git config --local user.email "violet.dev.master.bot@gmail.com" diff --git a/.github/workflows/violet-test.yml b/.github/workflows/violet-test.yml index d65cace04..cdda7cffd 100644 --- a/.github/workflows/violet-test.yml +++ b/.github/workflows/violet-test.yml @@ -8,6 +8,9 @@ jobs: test: if: ${{ github.event.label.name == 'ci/flutter-test' }} runs-on: ubuntu-latest + defaults: + run: + working-directory: violet steps: - uses: actions/checkout@v2 with: @@ -29,7 +32,6 @@ jobs: channel: "stable" - name: Preprocess Salt - working-directory: violet run: | cd lib/server wget -q ${{ secrets.SECRET_SALT }} || echo 'String getValid(String vToken) { return vToken; }' > salt.dart @@ -44,7 +46,6 @@ jobs: sudo cp build/linux/libquickjs_c_bridge_plugin.so /usr/lib/libquickjs_c_bridge_plugin.so - name: Preprocess Pull DB - working-directory: violet run: | cd test python3 pull-db.py @@ -53,5 +54,4 @@ jobs: 7z e -odb db.7z - name: Test - working-directory: violet run: flutter test test