@@ -33,16 +33,29 @@ jobs:
33
33
- name : Install dependencies
34
34
run : pnpm install
35
35
36
+ - name : Make PR title
37
+ id : getver
38
+ run : |
39
+ pnpm ci:version
40
+ echo "TITLE=v$(./scripts/get_version.sh)" >> "$GITHUB_OUTPUT"
41
+ git restore .
42
+ env :
43
+ # requires repo and read:user access
44
+ GITHUB_TOKEN : ${{ secrets.CHANGESET_GH_TOKEN }}
45
+
36
46
- name : Create Release Pull Request
37
47
id : changesets
38
48
uses : changesets/action@v1
39
49
with :
50
+ title : ${{ steps.getver.outputs.TITLE }}
51
+ commit : ${{ steps.getver.outputs.TITLE }}
40
52
version : pnpm ci:version
41
53
publish : pnpm ci:publish
42
54
env :
43
55
GITHUB_TOKEN : ${{ secrets.CHANGESET_GH_TOKEN }}
44
56
outputs :
45
- hasPublishedKotlin : ${{ steps.changesets.outputs.published == 'true' }}
57
+ publishedPackages : ${{ steps.changesets.outputs.publishedPackages }}
58
+ hasPublished : ${{ steps.changesets.outputs.published == 'true' }}
46
59
47
60
debug-outputs :
48
61
needs : release
@@ -51,13 +64,13 @@ jobs:
51
64
steps :
52
65
- name : " echo outputs"
53
66
run : |
54
- echo ${{ steps.changesets .outputs.publishedPackages }}
55
- echo ${{ needs.release.outputs.hasPublishedKotlin }}
67
+ echo ${{ needs.release .outputs.publishedPackages }}
68
+ echo ${{ needs.release.outputs.hasPublished }}
56
69
57
70
publish-kotlin :
58
71
needs : release
59
- name : Publish Android
60
- if : ${{ needs.release.outputs.hasPublishedKotlin == 'true' }}
72
+ name : Publish Kotlin
73
+ if : ${{ needs.release.outputs.hasPublished == 'true' }}
61
74
runs-on : ubuntu-latest
62
75
defaults :
63
76
run :
@@ -102,4 +115,31 @@ jobs:
102
115
run : ./gradlew publish
103
116
104
117
- name : Close and release to maven
105
- run : ./gradlew closeAndReleaseRepository
118
+ run : ./gradlew closeAndReleaseRepository
119
+
120
+ update-snapshot :
121
+ needs : release
122
+ name : Update SNAPSHOT
123
+ if : ${{ needs.release.outputs.hasPublished == 'true' }}
124
+ runs-on : ubuntu-latest
125
+
126
+ steps :
127
+ - name : Checkout Repo
128
+ uses : actions/checkout@v4
129
+
130
+ - name : Update snapshot
131
+ id : update
132
+ run : echo "SNAPSHOT_VERSION=$(./scripts/update_snapshot_version.sh)" >> "$GITHUB_OUTPUT"
133
+
134
+ - name : Log version
135
+ env :
136
+ SNAPSHOT_VERSION : ${{ steps.update.outputs.SNAPSHOT_VERSION }}
137
+ run : echo $SNAPSHOT_VERSION
138
+
139
+ - name : Create Update SNAPSHOT Pull Request
140
+ uses : peter-evans/create-pull-request@v6
141
+ with :
142
+ token : ${{ secrets.CHANGESET_GH_TOKEN }}
143
+ branch : dl/update_snapshot_ver
144
+ title : Prepare snapshot version ${{ steps.update.outputs.SNAPSHOT_VERSION }}
145
+ commit-message : Prepare snapshot version ${{ steps.update.outputs.SNAPSHOT_VERSION }}
0 commit comments