chore(release): 0.4.7 + fix resolve-channel prerelease labelling

resolve-channel treated EVERY v* tag as stable, so v0.4.6-beta got published
as a non-prerelease "Latest" release, sitting on top of the release line. Now
a pushed tag is used as-is and its suffix decides the channel: v*-alpha / v*-beta
are prereleases, only a bare vX.Y.Z is stable. (A tag is never recomputed from
Cargo.toml, so the release can't upload to a different tag than the one pushed.)

Version bumped 0.4.5 -> 0.4.7 (0.4.6 is already taken by the mislabelled beta).
This commit's tip is what gets tagged v0.4.7-beta to cut the beta build.
This commit is contained in:
ospab 2026-07-09 14:58:40 +03:00
parent aa1c4ccd52
commit 61091b6d56
8 changed files with 34 additions and 26 deletions

View File

@ -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

12
Cargo.lock generated
View File

@ -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",

View File

@ -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"

View File

@ -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

View File

@ -1,7 +1,7 @@
{
"name": "ostp-gui",
"private": true,
"version": "0.4.5",
"version": "0.4.7",
"type": "module",
"scripts": {
"tauri": "tauri",

View File

@ -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",

View File

@ -1,6 +1,6 @@
[package]
name = "ostp-gui"
version = "0.4.5"
version = "0.4.7"
description = "A Tauri App"
authors = ["you"]
edition = "2021"

View File

@ -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"