Skip to content

Commit 964f295

Browse files
committed
ci: fix version scripts
1 parent c5699af commit 964f295

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ jobs:
195195

196196
- name: Check version
197197
run: python scripts/version.py
198-
env:
199-
VERSION: ${{ github.event.release.tag_name }}
200198

201199
- name: Release
202200
uses: "marvinpinto/action-automatic-releases@latest"

scripts/version.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import os
22
import rtoml
33

4-
current_version = os.getenv("VERSION")
4+
current_version = os.getenv("GITHUB_REF_NAME")
55

6-
config = rtoml.load("Cargo.toml")
6+
with open("Cargo.toml", "r") as f:
7+
config = rtoml.load(f)
78

89
if config["package"]["version"] != current_version:
910
# exit with error message

0 commit comments

Comments
 (0)