Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
violet-dev committed Aug 4, 2024
1 parent f01f441 commit 88d7136
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/violet-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
jobs:
format:
runs-on: ubuntu-latest
defaults:
run:
working-directory: violet
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -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
Expand All @@ -45,6 +46,9 @@ jobs:
ios-build:
runs-on: macos-latest
needs: [format]
defaults:
run:
working-directory: violet
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -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
Expand All @@ -71,7 +74,6 @@ jobs:
python3 preprocess-ios.py
- name: Podfile
working-directory: violet
run: |
cd ios
rm Podfile.lock
Expand All @@ -82,7 +84,6 @@ jobs:
cd ..
- name: Build
working-directory: violet
run: |
flutter build ios --release --no-codesign
mkdir -p Payload
Expand All @@ -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
Expand All @@ -100,6 +100,9 @@ jobs:
android-build:
runs-on: ubuntu-latest
needs: [format]
defaults:
run:
working-directory: violet
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -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
Expand All @@ -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
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/violet-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
jobs:
sync-job:
runs-on: ubuntu-latest
defaults:
run:
working-directory: violet
steps:
#
# Setup
Expand All @@ -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
Expand All @@ -51,7 +51,6 @@ jobs:
# Update
#
- name: Revision
working-directory: violet
run: |
git checkout -b sync
git config --local user.email "[email protected]"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/violet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -53,5 +54,4 @@ jobs:
7z e -odb db.7z
- name: Test
working-directory: violet
run: flutter test test

0 comments on commit 88d7136

Please sign in to comment.