diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d882689..78b0eed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,19 +73,27 @@ jobs: BASE_VERSION=$(grep -m1 '^version' Cargo.toml | sed -E 's/version *= *"([^"]+)"/\1/') if [[ "${{ github.ref }}" == refs/tags/v* ]]; then - CHANNEL="stable" + # A pushed tag is authoritative — use it AS-IS (never recompute it + # from Cargo.toml, or the release would upload to a different tag than + # the one that triggered this run). The channel, and thus prerelease, + # is decided by the tag's suffix: v0.4.7-beta / v0.4.7-alpha are + # prereleases; a bare vX.Y.Z is the only thing that becomes stable. TAG="${{ github.ref_name }}" - elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - CHANNEL="${{ github.event.inputs.channel }}" - elif [ "${{ github.ref_name }}" = "alpha" ]; then - CHANNEL="alpha" - elif [ "${{ github.ref_name }}" = "pre-release" ]; then - CHANNEL="beta" + case "$TAG" in + *-alpha*) CHANNEL="alpha" ;; + *-beta*) CHANNEL="beta" ;; + *) CHANNEL="stable" ;; + esac else - CHANNEL="alpha" - fi - - if [ "$CHANNEL" != "stable" ]; then + # No tag (workflow_dispatch, or a legacy branch push): pick the + # channel, then synthesize the rolling tag from Cargo.toml's version. + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + CHANNEL="${{ github.event.inputs.channel }}" + elif [ "${{ github.ref_name }}" = "pre-release" ]; then + CHANNEL="beta" + else + CHANNEL="alpha" + fi TAG="v${BASE_VERSION}-${CHANNEL}" fi diff --git a/Cargo.lock b/Cargo.lock index 3165739..b5e836d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1384,7 +1384,7 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "ostp" -version = "0.4.4" +version = "0.4.7" dependencies = [ "anyhow", "base64", @@ -1406,7 +1406,7 @@ dependencies = [ [[package]] name = "ostp-client" -version = "0.4.4" +version = "0.4.7" dependencies = [ "anyhow", "base64", @@ -1437,7 +1437,7 @@ dependencies = [ [[package]] name = "ostp-core" -version = "0.4.4" +version = "0.4.7" dependencies = [ "anyhow", "bytes", @@ -1471,7 +1471,7 @@ dependencies = [ [[package]] name = "ostp-server" -version = "0.4.4" +version = "0.4.7" dependencies = [ "anyhow", "axum", @@ -1503,7 +1503,7 @@ dependencies = [ [[package]] name = "ostp-tun" -version = "0.4.4" +version = "0.4.7" dependencies = [ "anyhow", "libc", @@ -1515,7 +1515,7 @@ dependencies = [ [[package]] name = "ostp-tun-helper" -version = "0.4.4" +version = "0.4.7" dependencies = [ "anyhow", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 49910af..dfe2ea6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ resolver = "2" [workspace.package] edition = "2021" license = "AGPL-3.0" -version = "0.4.5" +version = "0.4.7" [workspace.dependencies] anyhow = "1.0" diff --git a/ostp-flutter/pubspec.yaml b/ostp-flutter/pubspec.yaml index e3fbe09..88185d8 100644 --- a/ostp-flutter/pubspec.yaml +++ b/ostp-flutter/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.4.5+17 +version: 0.4.7+18 environment: sdk: ^3.11.4 diff --git a/ostp-gui/package.json b/ostp-gui/package.json index 87f0f9a..baae742 100644 --- a/ostp-gui/package.json +++ b/ostp-gui/package.json @@ -1,7 +1,7 @@ { "name": "ostp-gui", "private": true, - "version": "0.4.5", + "version": "0.4.7", "type": "module", "scripts": { "tauri": "tauri", diff --git a/ostp-gui/src-tauri/Cargo.lock b/ostp-gui/src-tauri/Cargo.lock index 6f72f0c..d745275 100644 --- a/ostp-gui/src-tauri/Cargo.lock +++ b/ostp-gui/src-tauri/Cargo.lock @@ -2665,7 +2665,7 @@ dependencies = [ [[package]] name = "ostp-client" -version = "0.4.4" +version = "0.4.7" dependencies = [ "anyhow", "base64 0.22.1", @@ -2696,7 +2696,7 @@ dependencies = [ [[package]] name = "ostp-core" -version = "0.4.4" +version = "0.4.7" dependencies = [ "anyhow", "bytes", @@ -2713,7 +2713,7 @@ dependencies = [ [[package]] name = "ostp-gui" -version = "0.4.4" +version = "0.4.7" dependencies = [ "anyhow", "json_comments", @@ -2733,7 +2733,7 @@ dependencies = [ [[package]] name = "ostp-tun" -version = "0.4.4" +version = "0.4.7" dependencies = [ "anyhow", "libc", diff --git a/ostp-gui/src-tauri/Cargo.toml b/ostp-gui/src-tauri/Cargo.toml index 5676ce5..5723ecd 100644 --- a/ostp-gui/src-tauri/Cargo.toml +++ b/ostp-gui/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ostp-gui" -version = "0.4.5" +version = "0.4.7" description = "A Tauri App" authors = ["you"] edition = "2021" diff --git a/ostp-gui/src-tauri/tauri.conf.json b/ostp-gui/src-tauri/tauri.conf.json index 94815b3..dc5d597 100644 --- a/ostp-gui/src-tauri/tauri.conf.json +++ b/ostp-gui/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "ostp-gui", - "version": "0.4.5", + "version": "0.4.7", "identifier": "com.ospab.ostp", "build": { "frontendDist": "../src"