File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release IPA Package
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - main
8+ paths :
9+ - ' tools/spectral/ipa/package.json'
10+
11+ jobs :
12+ check-version :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout Repository
17+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
18+ with :
19+ sparse-checkout : |
20+ tools/spectral/ipa
21+
22+ - name : Check Version Bump
23+ working-directory : tools/spectral/ipa
24+ id : version_check
25+ run : |
26+ current_version=$(jq '.version' package.json)
27+ echo "Current version: $current_version"
28+
29+ previous_version=$(git show origin/${{ github.event.pull_request.base.ref }}:tools/spectral/ipa/package.json | jq -r '.version')
30+
31+ if [[ -z "$previous_version" || "$previous_version" == "null" ]]; then
32+ previous_version="none"
33+ fi
34+ echo "Previous version : $previous_version"
35+
36+ if [["$previous_version" == "$current_version" ]]; then
37+ echo "No version bump to release".
38+ exit 0
39+ fi
40+ publish :
41+ needs : check-version
42+ runs-on : ubuntu-latest
43+ working-directory : tools/spectral/ipa
44+ permissions :
45+ contents : read
46+ id-token : write
47+
48+ steps :
49+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
50+ - uses : actions/setup-node@v4
51+ with :
52+ node-version : ' 20.x'
53+ registry-url : ' https://registry.npmjs.org'
54+ - run : npm ci
55+ - run : npm publish --access public
56+ env :
57+ NODE_AUTH_TOKEN : ${{ secrets.IPA_VALIDATION_TOKEN }}
You can’t perform that action at this time.
0 commit comments