Skip to content

Commit

Permalink
[FIX] Hotfix library version
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-his committed Apr 15, 2024
1 parent bc7df81 commit 7adb0f6
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 12 deletions.
37 changes: 30 additions & 7 deletions .github/workflows/create-release.yml
Expand Up @@ -2,13 +2,10 @@
name: Create Release(s)

on:
push:
branches:
- main
workflow_run:
workflows:
- "Build & Test"
types: [completed]
# workflow_run:
# workflows:
# - "Build & Test"
# types: [completed]
workflow_dispatch:
inputs:
version:
Expand Down Expand Up @@ -59,3 +56,29 @@ jobs:
run: git push
- name: Push modified tags
run: git push --tags
publish_github_release:
name: Binary release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
- uses: bluefireteam/melos-action@v2
- uses: goto-bus-stop/setup-zig@v2
- uses: KyleMayes/install-llvm-action@v1
with:
version: "15"
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: nttld/setup-ndk@v1
with:
ndk-version: r25b

- name: Build all library binaries
run: melos run build

- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
files: platform-build/*
9 changes: 7 additions & 2 deletions .github/workflows/publish-release.yml
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
publish_github_release:
# macOS because we can cross-compile to all other platforms from it
name: Binary release
runs-on: ubuntu-latest

steps:
Expand All @@ -40,6 +40,7 @@ jobs:
files: platform-build/*

publish_pub_release:
name: Flutter Publish
needs: publish_github_release
runs-on: ubuntu-latest

Expand Down Expand Up @@ -83,6 +84,7 @@ jobs:
run: cargo publish
# PYTHON
linux:
name: Python (linux)
defaults:
run:
working-directory: packages/codde_protocol/native/
Expand All @@ -109,6 +111,7 @@ jobs:
path: dist

windows:
name: Python (windows)
defaults:
run:
working-directory: packages/codde_protocol/native/
Expand All @@ -135,6 +138,7 @@ jobs:
path: dist

macos:
name: Python (macOS)
defaults:
run:
working-directory: packages/codde_protocol/native/
Expand All @@ -160,6 +164,7 @@ jobs:
path: dist

sdist:
name: Python (sdist)
defaults:
run:
working-directory: packages/codde_protocol/native/
Expand All @@ -181,7 +186,7 @@ jobs:
path: dist

release:
name: Release
name: Python Release (PyPI)
defaults:
run:
working-directory: packages/codde_protocol/native/
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -15,3 +15,8 @@

- Add Widgets to registry
- Fix publishing issues

## 0.1.4

- Fix CI/CD
- Clean up code
5 changes: 5 additions & 0 deletions packages/codde_protocol/CHANGELOG.md
Expand Up @@ -15,3 +15,8 @@

- Add Widgets to registry
- Fix publishing issues

## 0.1.4

- Fix CI/CD
- Clean up code
2 changes: 1 addition & 1 deletion packages/codde_protocol/pubspec.yaml
Expand Up @@ -11,7 +11,7 @@ environment:
# Add regular dependencies here.
dependencies:
ffi: ^2.1.0
flutter_rust_bridge: 2.0.0-dev.30
flutter_rust_bridge: ^2.0.0-dev.30
freezed_annotation: ^2.4.1

dev_dependencies:
Expand Down
5 changes: 5 additions & 0 deletions packages/flutter_codde_protocol/CHANGELOG.md
Expand Up @@ -15,3 +15,8 @@

- Add Widgets to registry
- Fix publishing issues

## 0.1.4

- Fix CI/CD
- Clean up code
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/flutter_codde_protocol/pubspec.yaml
Expand Up @@ -12,7 +12,7 @@ dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.0.2
codde_protocol: ^0.1.2
codde_protocol: ^0.1.4
# path: ../codde_protocol
flutter_rust_bridge: ^2.0.0-dev.30
freezed_annotation: ^2.4.1
Expand Down
3 changes: 2 additions & 1 deletion scripts/version.sh
@@ -1,7 +1,7 @@
#!/bin/bash

if [ -z "$1" ]; then
CURR_VERSION=codde_protocol-v$(awk '/^version: /{print $2}' packages/codde_protocol/pubspec.yaml)
CURR_VERSION=$(awk '/^version: /{print $2}' packages/codde_protocol/pubspec.yaml | sed 's/\"//g')
else
CURR_VERSION=$1
fi
Expand Down Expand Up @@ -33,6 +33,7 @@ sed -i "s/version = .*/version = \"$CURR_VERSION\"/" packages/codde_protocol/nat
sed -i "s/version: .*/version: \"$CURR_VERSION\"/" packages/codde_protocol/pubspec.yaml
# Flutter
sed -i "s/version: .*/version: \"$CURR_VERSION\"/" packages/flutter_codde_protocol/pubspec.yaml
sed -i "s/codde_protocol: .*/codde_protocol: \^$CURR_VERSION/" packages/flutter_codde_protocol/pubspec.yaml

# git add packages/flutter_codde_protocol/

Expand Down

0 comments on commit 7adb0f6

Please sign in to comment.