File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 push :
77 branches : [main]
88jobs :
9+ check-release :
10+ runs-on : ubuntu-latest
11+ outputs :
12+ will-publish : ${{ steps.check.outputs.will-publish }}
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v4
16+ - name : Check for pending changesets
17+ id : check
18+ run : |
19+ CHANGESETS=$(find .changeset -name "*.md" -not -name "README.md" | wc -l | tr -d ' ')
20+ if [ "$CHANGESETS" -eq 0 ]; then
21+ echo "will-publish=true" >> $GITHUB_OUTPUT
22+ else
23+ echo "will-publish=false" >> $GITHUB_OUTPUT
24+ fi
25+
926 build-android :
27+ needs : check-release
28+ if : needs.check-release.outputs.will-publish == 'true'
1029 runs-on : ubuntu-latest
1130 steps :
1231 - name : Checkout
2645 path : packages/async-storage/android/local_repo
2746
2847 build-apple :
48+ needs : check-release
49+ if : needs.check-release.outputs.will-publish == 'true'
2950 runs-on : macos-latest
3051 steps :
3152 - name : Checkout
4667
4768 release :
4869 runs-on : ubuntu-latest
49- needs : [build-android, build-apple]
70+ needs : [check-release, build-android, build-apple]
71+ if : ' !failure() && !cancelled()'
5072 steps :
5173 - name : Checkout
5274 uses : actions/checkout@v4
@@ -57,11 +79,13 @@ jobs:
5779 - name : Install dependencies
5880 run : yarn
5981 - name : Download Android artifacts
82+ if : needs.check-release.outputs.will-publish == 'true'
6083 uses : actions/download-artifact@v4
6184 with :
6285 name : android-artifacts
6386 path : packages/async-storage/android/local_repo
6487 - name : Download Apple artifacts
88+ if : needs.check-release.outputs.will-publish == 'true'
6589 uses : actions/download-artifact@v4
6690 with :
6791 name : apple-artifacts
You can’t perform that action at this time.
0 commit comments