Skip to content

Commit 888dccc

Browse files
authored
Add publish dry run to action (#23)
* Add publish dry run to action * Do the dry run first since it's faster * Clean up the action * Update caching actions * Update false secrets
1 parent 65bf206 commit 888dccc

4 files changed

Lines changed: 19 additions & 7 deletions

File tree

.github/workflows/generate.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ jobs:
1616

1717
- name: Pub cache
1818
uses: actions/cache@v4
19+
env:
20+
cache-name: root
1921
with:
20-
path: .pub-cache
21-
key: pub-cache-${{ hashFiles('**/pubspec.lock') }}
22-
restore-keys: pub-cache-
22+
path: ${{ env.PUB_CACHE }}
23+
key: ${{ env.cache-name }}-${{ hashFiles('**/pubspec.lock') }}
24+
restore-keys: ${{ env.cache-name }}-
2325

2426
- name: Homebrew cache
2527
uses: actions/cache@v4

.github/workflows/pana.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ jobs:
1515
strategy:
1616
matrix:
1717
package: [vrchat_dart, vrchat_dart_generated]
18+
defaults:
19+
run:
20+
working-directory: ${{ matrix.package }}
1821
steps:
1922
- uses: actions/checkout@v4
2023
- uses: subosito/flutter-action@v2
@@ -23,14 +26,16 @@ jobs:
2326
- name: Pub cache
2427
uses: actions/cache@v4
2528
env:
26-
cache-name: pub-cache
29+
cache-name: ${{ matrix.package }}
2730
with:
2831
path: ${{ env.PUB_CACHE }}
2932
key: ${{ env.cache-name }}-${{ hashFiles('**/pubspec.lock') }}
3033
restore-keys: ${{ env.cache-name }}-
34+
- name: Pub get
35+
run: dart pub get
36+
- name: Publish dry run
37+
run: dart pub publish --dry-run
3138
- name: Run pana
3239
run: |
33-
cd ${{ matrix.package }}
34-
dart pub get
3540
dart pub global activate pana
3641
pana --no-warning --exit-code-threshold 0

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Pub cache
2121
uses: actions/cache@v4
2222
env:
23-
cache-name: pub-cache
23+
cache-name: vrchat_dart
2424
with:
2525
path: ${{ env.PUB_CACHE }}
2626
key: ${{ env.cache-name }}-${{ hashFiles('**/pubspec.lock') }}

vrchat_dart_generated/pubspec.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ dev_dependencies:
1414
build_runner: ^2.4.10
1515
json_serializable: ^6.1.5
1616
lints: ^5.0.0
17+
18+
false_secrets:
19+
- /doc/APIConfig.md
20+
- /lib/src/model/api_config.dart
21+
- /lib/src/model/api_config.g.dart

0 commit comments

Comments
 (0)