Skip to content

Commit 4896a09

Browse files
committed
c
1 parent 97e1725 commit 4896a09

4 files changed

Lines changed: 24 additions & 48 deletions

File tree

.github/workflows/flutter-release.yml

Lines changed: 18 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,36 @@
11
name: Flutter Release
22

3-
# Workflow: Create GitHub Release first (with tag v*), then run this workflow manually
4-
# pub.dev OIDC only works with 'push' or 'workflow_dispatch' events, not 'release'
3+
# Triggered by pushing a tag (v*)
4+
# pub.dev OIDC requires tag context, so we trigger on tag push
5+
#
6+
# Release process:
7+
# 1. Update version in pubspec.yaml, podspec, CHANGELOG.md
8+
# 2. Commit and push to main
9+
# 3. Create and push tag: git tag v0.2.5 && git push origin v0.2.5
10+
# 4. Workflow runs automatically and publishes everywhere
511
on:
6-
workflow_dispatch:
7-
inputs:
8-
version:
9-
description: 'Version to publish (leave empty to use latest release tag)'
10-
required: false
11-
type: string
12-
dry_run:
13-
description: 'Dry run (do not actually publish)'
14-
required: false
15-
type: boolean
16-
default: false
12+
push:
13+
tags:
14+
- 'v*'
1715

1816
env:
1917
CARGO_TERM_COLOR: always
2018
FLUTTER_VERSION: '3.24.0'
2119

2220
jobs:
23-
# Get version from input or latest release
21+
# Get version from tag
2422
get-version:
2523
runs-on: ubuntu-latest
2624
outputs:
2725
version: ${{ steps.version.outputs.version }}
2826
steps:
29-
- name: Get version
27+
- name: Get version from tag
3028
id: version
31-
env:
32-
GH_TOKEN: ${{ github.token }}
3329
run: |
34-
if [ -n "${{ inputs.version }}" ]; then
35-
echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
36-
echo "Using provided version: ${{ inputs.version }}"
37-
else
38-
# Get latest release tag and strip 'v' prefix
39-
LATEST=$(gh release view --repo ${{ github.repository }} --json tagName -q '.tagName' | sed 's/^v//')
40-
echo "version=$LATEST" >> $GITHUB_OUTPUT
41-
echo "Using latest release version: $LATEST"
42-
fi
30+
# Strip 'v' prefix from tag
31+
VERSION="${GITHUB_REF_NAME#v}"
32+
echo "version=$VERSION" >> $GITHUB_OUTPUT
33+
echo "Version from tag: $VERSION"
4334
4435
# Generate Dart bindings
4536
generate-bindings:
@@ -325,13 +316,7 @@ jobs:
325316
echo "Package size estimate:"
326317
du -sh packages/fula_client/
327318
328-
- name: Publish to pub.dev (dry run)
329-
if: inputs.dry_run
330-
working-directory: packages/fula_client
331-
run: flutter pub publish --dry-run
332-
333319
- name: Publish to pub.dev
334-
if: ${{ !inputs.dry_run }}
335320
working-directory: packages/fula_client
336321
run: flutter pub publish --force
337322

@@ -358,25 +343,16 @@ jobs:
358343
ls -la wasm-package/
359344
cat wasm-package/package.json
360345
361-
- name: Publish to npm (dry run)
362-
if: inputs.dry_run
363-
working-directory: wasm-package
364-
run: npm publish --access public --dry-run
365-
env:
366-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
367-
368346
- name: Publish to npm
369-
if: ${{ !inputs.dry_run }}
370347
working-directory: wasm-package
371348
run: npm publish --access public
372349
env:
373350
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
374351

375-
# Upload artifacts to existing GitHub Release
352+
# Upload artifacts to GitHub Release (created automatically from tag)
376353
upload-release-assets:
377354
needs: [get-version, build-android, build-ios, build-wasm]
378355
runs-on: ubuntu-latest
379-
if: ${{ !inputs.dry_run }}
380356
steps:
381357
- name: Download all artifacts
382358
uses: actions/download-artifact@v4

packages/fula_client/CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.2.4] - 2026-01-11
8+
## [0.2.5] - 2026-01-11
99

1010
### Changed
1111

12-
- Release workflow now uses workflow_dispatch for pub.dev OIDC compatibility
13-
- Create GitHub Release first, then run workflow to publish
12+
- Release workflow now triggers on tag push (v*) for pub.dev OIDC compatibility
13+
- Simplified release process: just push a tag to publish everywhere
1414

1515
### Fixed
1616

17-
- pub.dev OIDC authentication now works (requires workflow_dispatch event)
17+
- pub.dev OIDC authentication now works (requires tag context, not branch)
1818

1919
## [0.2.3] - 2026-01-11
2020

packages/fula_client/ios/fula_client.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Pod::Spec.new do |s|
88
s.name = 'fula_client'
9-
s.version = '0.2.4'
9+
s.version = '0.2.5'
1010
s.summary = 'Flutter SDK for Fula decentralized storage'
1111
s.description = <<-DESC
1212
A Flutter plugin providing client-side encryption, metadata privacy,

packages/fula_client/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: fula_client
22
description: Flutter SDK for Fula decentralized storage with client-side encryption, metadata privacy, and secure sharing.
3-
version: 0.2.4
3+
version: 0.2.5
44
homepage: https://fx.land
55
repository: https://github.com/functionland/fula-api
66
issue_tracker: https://github.com/functionland/fula-api/issues

0 commit comments

Comments
 (0)