Skip to content

Commit b88ee92

Browse files
committed
'tag' variable was supplied
1 parent 3725bf1 commit b88ee92

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,20 @@ env:
1313
CARGO_TERM_COLOR: always
1414

1515
jobs:
16+
get-info:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
cargo_version: ${{ steps.get-version.outputs.VERSION }}
20+
workflow_git_tag: ${{ steps.get-version.outputs.WORKFLOW_GIT_TAG }}
21+
steps:
22+
- name: Get Version from Cargo.toml
23+
id: get-version
24+
run: |
25+
VERSION=$(grep '^version = ' Cargo.toml | sed -E 's/version = "(.*)"/\1/')
26+
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
27+
echo "WORKFLOW_GIT_TAG=v$VERSION" >> "$GITHUB_OUTPUT"
1628
build:
29+
needs: get-info
1730
strategy:
1831
matrix:
1932
os: [ ubuntu-latest, macos-14, windows-latest ]
@@ -72,8 +85,8 @@ jobs:
7285

7386
- name: Create or Update Release
7487
env:
75-
VERSION: ${{ needs.prepare-release.outputs.rr_cargo_version }}
76-
WORKFLOW_GIT_TAG: ${{ needs.prepare-release.outputs.workflow_git_tag}}
88+
VERSION: ${{ needs.get-info.outputs.cargo_version }}
89+
WORKFLOW_GIT_TAG: ${{ needs.get-info.outputs.workflow_git_tag}}
7790
uses: ncipollo/release-action@v1
7891
with:
7992
artifacts: "${{ env.FILENAME }}.tar.gz,${{ env.FILENAME }}.zip"

0 commit comments

Comments
 (0)