Skip to content

Fix cargo publish paths #256

Fix cargo publish paths

Fix cargo publish paths #256

Workflow file for this run

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: