Debug release CI #251
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
branches: | |
- fix-release-ci | |
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: | | |
echo "tag=v0.4.5" >> $GITHUB_OUTPUT | |
- name: Create Release | |
if: false | |
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 | |
with: | |
submodules: true | |
- name: Build Linux | |
uses: ./.github/actions/linux | |
libs_macos: | |
name: Building macOS libraries | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build macOS | |
uses: ./.github/actions/macos | |
libs_windows: | |
name: Building Windows libraries | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build Windows | |
uses: ./.github/actions/windows | |
libs_android: | |
name: Building Android libraries | |
if: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- 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 | |
if: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build wasm | |
uses: ./.github/actions/wasm | |
libs_xcframework: | |
name: Build XCFramework | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Build XCFramework | |
uses: ./.github/actions/xcframework | |
publish_android: | |
permissions: | |
contents: read | |
packages: write | |
name: Publish Android | |
if: false | |
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 | |
with: | |
submodules: true | |
- 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 | |
with: | |
submodules: true | |
- name: Download libs | |
uses: actions/download-artifact@v5 | |
with: | |
name: linux-library | |
- name: Download libs | |
uses: actions/download-artifact@v5 | |
with: | |
name: macos-library | |
- name: Download libs | |
uses: actions/download-artifact@v5 | |
with: | |
name: windows-library | |
- 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 }}" *.dylib | |
gh release upload "${{ needs.draft_release.outputs.tag }}" *.so | |
publish_wasm: | |
if: false | |
name: Publish WASM builds | |
needs: [ draft_release, libs_wasm ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- 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 }} | |
create_sdk_issue: | |
name: "Create issue for SDK updates" | |
permissions: | |
issues: write | |
runs-on: macos-latest | |
needs: | |
- draft_release | |
- publish_ios_pod_and_spm_package | |
- publish_desktop | |
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 | |
* [ ] 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: |