Skip to content

Commit 3d114ce

Browse files
authored
Update dev_build.yml
1 parent 131920c commit 3d114ce

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/dev_build.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: always
11+
# Указываем версию прямо здесь
12+
APP_VERSION: "1.9.6"
1113

1214
jobs:
1315
build_linux:
@@ -16,9 +18,11 @@ jobs:
1618

1719
steps:
1820
- uses: actions/checkout@v4
19-
- name: Get version
20-
id: version
21-
run: echo "version=$(cargo pkgid | cut -d'#' -f2)" >> $GITHUB_OUTPUT
21+
- name: Update Cargo.toml version
22+
run: |
23+
sed -i 's/^version = .*/version = "${{ env.APP_VERSION }}"/' Cargo.toml
24+
# Также обновляем версию в метаданных для Windows
25+
sed -i 's/ProductVersion = .*/ProductVersion = "${{ env.APP_VERSION }}"/' Cargo.toml
2226
- name: Build linux
2327
run: cargo build --release
2428
- name: Move binary
@@ -39,6 +43,10 @@ jobs:
3943

4044
steps:
4145
- uses: actions/checkout@v4
46+
- name: Update Cargo.toml version
47+
run: |
48+
sed -i 's/^version = .*/version = "${{ env.APP_VERSION }}"/' Cargo.toml
49+
sed -i 's/ProductVersion = .*/ProductVersion = "${{ env.APP_VERSION }}"/' Cargo.toml
4250
- name: Build windows
4351
run: cargo build --release
4452
- name: Move binary
@@ -61,9 +69,6 @@ jobs:
6169

6270
steps:
6371
- uses: actions/checkout@v4
64-
- name: Get version
65-
id: version
66-
run: echo "version=$(cargo pkgid | cut -d'#' -f2)" >> $GITHUB_OUTPUT
6772
- name: Download Linux artifacts
6873
uses: actions/download-artifact@v4
6974
with:
@@ -77,8 +82,8 @@ jobs:
7782
- name: Create Release
7883
uses: softprops/action-gh-release@v2
7984
with:
80-
tag_name: v${{ steps.version.outputs.version }}
81-
name: Cross Cleaner ${{ steps.version.outputs.version }}
85+
tag_name: v${{ env.APP_VERSION }}
86+
name: Cross Cleaner ${{ env.APP_VERSION }}
8287
files: |
8388
linux-binaries/Cross_Cleaner_CLI
8489
linux-binaries/Cross_Cleaner_GUI

0 commit comments

Comments
 (0)