Skip to content

Publish Swift Package #37

Publish Swift Package

Publish Swift Package #37

Workflow file for this run

name: Publish Swift Package
on:
workflow_dispatch:
inputs:
octobase-branch:
description: 'Octobase Branch'
required: false
default: 'master'
jobs:
build-swift:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v3
with:
repository: toeverything/Octobase
ref: refs/heads/${{ inputs.octobase-branch }}
- name: Set up Xcode
run: |
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
./vendor
./.cargo/config
./node_modules/.pnpm-store
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: build swift
run: |
rm -rf apps/swift/OctoBaseSwift
cargo run -p jwst-swift-integrate --release
cp -r apps/swift/OctoBaseSwift ~/swift-build-output
- uses: actions/checkout@v3
with:
repository: toeverything/octobase-swift-binding
ref: refs/heads/master
- name: update swift package
run: |
rm -rf RustXcframework Sources && rm Package.swift
cp -r ~/swift-build-output/* .
chmod +x ./scripts/bump-podspec-version.sh && ./scripts/bump-podspec-version.sh
git config --global user.name ${{ github.actor }}
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git add . && git commit -m "bump version"
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
- run: |
chmod +x ./scripts/push-tag.sh && ./scripts/push-tag.sh