-
Notifications
You must be signed in to change notification settings - Fork 11
300 lines (265 loc) · 9.17 KB
/
release.yml
File metadata and controls
300 lines (265 loc) · 9.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
name: release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
branches:
- fix-cargo-publish
jobs:
# draft_release:
# name: Create Draft GitHub Release
# runs-on: ubuntu-latest
# outputs:
# tag: ${{ steps.tag.outputs.tag }}
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Set tag name
# id: tag
# run: |
# tag=$(basename "${{ github.ref }}")
# echo "tag=$tag" >> $GITHUB_OUTPUT
# - name: Create Release
# env:
# GH_TOKEN: ${{ github.token }}
# GH_REPO: ${{ github.repository }}
# run: |
# tag="${{ steps.tag.outputs.tag }}"
# body="Release $tag"
# gh release create --draft "$tag" --title "$tag" --notes "$body"
# libs_linux:
# name: Building Linux libraries
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Build Linux
# uses: ./.github/actions/linux
# libs_macos:
# name: Building macOS libraries
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# - name: Build macOS
# uses: ./.github/actions/macos
# libs_windows:
# name: Building Windows libraries
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v4
# - name: Build Windows
# uses: ./.github/actions/windows
# libs_android:
# name: Building Android libraries
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Build Android
# uses: ./.github/actions/android
# with:
# gpg-key: ${{ secrets.GPG_PRIVATE_KEY }}
# gpg-password: ${{ secrets.GPG_PASSWORD }}
# libs_wasm:
# name: Basic WASM build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Build wasm
# uses: ./.github/actions/wasm
# libs_xcframework:
# name: Build XCFramework
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# - name: Build XCFramework
# uses: ./.github/actions/xcframework
# publish_android:
# permissions:
# contents: read
# packages: write
# name: Publish Android
# needs: [ draft_release, libs_android ]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/download-artifact@v4
# with:
# name: android-library
# - name: Publish to Maven Central
# run: |
# curl --request POST \
# --header 'Authorization: Bearer ${{ secrets.CENTRAL_AUTH }}' \
# --form bundle=@powersync_android.zip \
# 'https://central.sonatype.com/api/v1/publisher/upload?publishingType=AUTOMATIC'
# publish_ios_pod_and_spm_package:
# name: Publish iOS
# needs: [ draft_release, libs_xcframework ]
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# - name: Download libs
# uses: actions/download-artifact@v5
# with:
# name: xcframework
# - name: Extract xcframework
# run: unzip powersync-sqlite-core.xcframework.zip "powersync-sqlite-core.xcframework/*"
# - name: Lint pod
# run: |
# pod lib lint
# # For SPM package
# - name: Set xcFramework file name used for SPM package
# id: fileName
# run: |
# FILENAME=powersync-sqlite-core.xcframework.zip
# echo "fileName=$FILENAME" >> $GITHUB_OUTPUT
# - name: Upload xcframework
# env:
# GH_TOKEN: ${{ github.token }}
# GH_REPO: ${{ github.repository }}
# run: |
# gh release upload "${{ needs.draft_release.outputs.tag }}" ${{ steps.fileName.outputs.fileName }}
# # For SPM package
# - name: Generate and add checksum to output
# id: checksum
# run: |
# CHECKSUM=$(swift package compute-checksum ${{ steps.fileName.outputs.fileName }})
# echo "checksum=$CHECKSUM" >> $GITHUB_OUTPUT
# - name: Dispatch release to SPM package
# uses: peter-evans/repository-dispatch@v3
# with:
# token: ${{ secrets.SWIFT_PUBLISH_TOKEN }}
# repository: powersync-ja/powersync-sqlite-core-swift
# event-type: spm-release
# client-payload: |-
# {
# "repository": "${{ github.repository }}",
# "title": "${{ needs.draft_release.outputs.tag }}",
# "tag": "${{ needs.draft_release.outputs.tag }}",
# "checksum": "${{ steps.checksum.outputs.checksum }}",
# "fileName": "${{ steps.fileName.outputs.fileName }}"
# }
# publish_desktop:
# name: Publish Desktop libraries
# needs: [ draft_release, libs_linux, libs_macos, libs_windows ]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Download Linux libraries
# uses: actions/download-artifact@v5
# with:
# name: linux-library
# - name: Download macOS libraries
# uses: actions/download-artifact@v5
# with:
# name: macos-library
# - name: Download Windows libraries
# uses: actions/download-artifact@v5
# with:
# name: windows-library
# - name: Download Windows libraries
# uses: actions/download-artifact@v5
# with:
# name: windows-library
# - name: Download static Android libraries
# uses: actions/download-artifact@v5
# with:
# name: android-static
# - name: List libraries
# run: ls -al
# - name: Upload binary
# env:
# GH_TOKEN: ${{ github.token }}
# GH_REPO: ${{ github.repository }}
# run: |
# gh release upload "${{ needs.draft_release.outputs.tag }}" *.dll
# gh release upload "${{ needs.draft_release.outputs.tag }}" *.lib
# gh release upload "${{ needs.draft_release.outputs.tag }}" *.dylib
# gh release upload "${{ needs.draft_release.outputs.tag }}" *.so
# gh release upload "${{ needs.draft_release.outputs.tag }}" *.a
# publish_wasm:
# name: Publish WASM builds
# needs: [ draft_release, libs_wasm ]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Download wasm bundle
# uses: actions/download-artifact@v5
# with:
# name: wasm-library
# - name: Upload libpowersync.wasm
# uses: ./.github/actions/upload
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# file-name: libpowersync.wasm
# tag: ${{ needs.draft_release.outputs.tag }}
# - name: Upload libpowersync-async.wasm
# uses: ./.github/actions/upload
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# file-name: libpowersync-async.wasm
# tag: ${{ needs.draft_release.outputs.tag }}
# - name: Upload libpowersync-wasm.a
# uses: ./.github/actions/upload
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# file-name: libpowersync-wasm.a
# tag: ${{ needs.draft_release.outputs.tag }}
publish_crates_io:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC token exchange
steps:
- uses: actions/checkout@v5
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- name: Publish powersync_sqlite_nostd
run: cargo publish
working-directory: crates/sqlite_nostd
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
- name: Publish powersync_core
run: cargo publish
working-directory: crates/core
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
# create_sdk_issue:
# name: "Create issue for SDK updates"
# permissions:
# issues: write
# runs-on: macos-latest
# needs:
# - draft_release
# - publish_android
# - publish_ios_pod_and_spm_package
# - publish_desktop
# - publish_wasm
# - publish_crates_io
# steps:
# - name: Create issue
# run: |
# gh issue create \
# --title "$TITLE" \
# --assignee "$ASSIGNEES" \
# --body "$BODY"
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GH_REPO: ${{ github.repository }}
# TITLE: "Release checklist: ${{ needs.draft_release.outputs.tag }}"
# ASSIGNES: ${{ github.event.push.sender }}
# BODY: |
# This is a checklist to track the release of ${{ needs.draft_release.outputs.tag }}.
# Core build (this repo):
# * [x] GitHub Release
# * [x] New version released on crates.io
# * [ ] Android aar released on Maven Central
# * [ ] Cocoapod released
# SQLite + powersync bundles:
# * [ ] react-native-quick-sqlite:
# * [ ] wa-sqlite build:
# * [ ] sql.js dev adapter:
# User-facing SDK updates:
# * [ ] powersync.dart:
# * [ ] powersync-js:
# * [ ] kotlin:
# * [ ] swift:
# * [ ] native: