4646 runs-on : ${{ matrix.runner }}
4747
4848 steps :
49- - uses : actions/checkout@v4
49+ - uses : actions/checkout@v5
50+
51+ - name : Check versions match tag
52+ run : |
53+ # Extract version from Cargo.toml
54+ SUPER_STT_CARGO_VERSION=$(grep "^version" super-stt/Cargo.toml | head -1 | cut -d'"' -f2)
55+ SUPER_STT_APP_CARGO_VERSION=$(grep "^version" super-stt-app/Cargo.toml | head -1 | cut -d'"' -f2)
56+ SUPER_STT_COSMIC_APPLET_CARGO_VERSION=$(grep "^version" super-stt-cosmic-applet/Cargo.toml | head -1 | cut -d'"' -f2)
57+ echo "Cargo.toml version: $SUPER_STT_CARGO_VERSION"
58+ echo "App Cargo.toml version: $SUPER_STT_APP_CARGO_VERSION"
59+ echo "Cosmic Applet Cargo.toml version: $SUPER_STT_COSMIC_APPLET_CARGO_VERSION"
60+
61+ # Get tag name (remove 'refs/tags/' prefix)
62+ TAG_NAME="${GITHUB_REF#refs/tags/}"
63+ echo "Git tag: $TAG_NAME"
64+
65+ # Check if tag starts with 'v'
66+ if [[ ! "$TAG_NAME" =~ ^v[0-9] ]]; then
67+ echo "Error: Tag must start with 'v' followed by a version number!"
68+ echo " Current tag: $TAG_NAME"
69+ echo " Expected format: v0.1.1"
70+ echo ""
71+ echo "Please create a tag that starts with 'v'."
72+ exit 1
73+ fi
74+
75+ # Remove 'v' prefix from tag for comparison
76+ TAG_VERSION="${TAG_NAME#v}"
77+ echo "Tag version: $TAG_VERSION"
78+
79+ # Check if versions match
80+ if [ "$SUPER_STT_CARGO_VERSION" != "$TAG_VERSION" ]; then
81+ echo "Error: Version mismatch!"
82+ echo " Super STT Cargo.toml version: $SUPER_STT_CARGO_VERSION"
83+ exit 1
84+ fi
85+ if [ "$SUPER_STT_APP_CARGO_VERSION" != "$TAG_VERSION" ]; then
86+ echo "Error: Version mismatch!"
87+ echo " Super STT App Cargo.toml version: $SUPER_STT_APP_CARGO_VERSION"
88+ exit 1
89+ fi
90+ if [ "$SUPER_STT_COSMIC_APPLET_CARGO_VERSION" != "$TAG_VERSION" ]; then
91+ echo "Error: Version mismatch!"
92+ echo " Super STT Cosmic Applet Cargo.toml version: $SUPER_STT_COSMIC_APPLET_CARGO_VERSION"
93+ exit 1
94+ fi
95+
96+ echo "✓ Version check passed"
5097
5198 - name : Install system dependencies
5299 run : |
93140 cuda : " 12.4.0"
94141
95142 - name : Cache dependencies
96- uses : actions/cache@v3
143+ uses : actions/cache@v4
97144 with :
98145 path : |
99146 ~/.cargo/registry
@@ -134,7 +181,7 @@ jobs:
134181 tar -czf super-stt-${{ matrix.target }}-${{ matrix.suffix }}.tar.gz -C dist .
135182
136183 - name : Upload artifact
137- uses : actions/upload-artifact@v3
184+ uses : actions/upload-artifact@v4
138185 with :
139186 name : super-stt-${{ matrix.target }}-${{ matrix.suffix }}
140187 path : super-stt-${{ matrix.target }}-${{ matrix.suffix }}.tar.gz
@@ -146,15 +193,15 @@ jobs:
146193 if : startsWith(github.ref, 'refs/tags/')
147194
148195 steps :
149- - uses : actions/checkout@v4
196+ - uses : actions/checkout@v5
150197
151198 - name : Download all artifacts
152- uses : actions/download-artifact@v3
199+ uses : actions/download-artifact@v5
153200 with :
154201 path : artifacts
155202
156203 - name : Create Release
157- uses : softprops/action-gh-release@v1
204+ uses : softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8
158205 with :
159206 files : artifacts/**/*.tar.gz
160207 draft : false
0 commit comments