From 416331e1fd2a395f44ee0dd7020cb4ae9a205353 Mon Sep 17 00:00:00 2001 From: Dennis Diatlov Date: Mon, 4 Nov 2024 15:10:06 +0000 Subject: [PATCH] ddd --- .github/workflows/release-rs.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-rs.yml b/.github/workflows/release-rs.yml index 149ffb5..e591877 100644 --- a/.github/workflows/release-rs.yml +++ b/.github/workflows/release-rs.yml @@ -1,14 +1,13 @@ name: Release (Rust) on: -# release: -# types: [published] - push: - tags: - - 'rs/v*' + push: + tags: + - 'rs/v*' jobs: - j1: + release: + name: Release runs-on: ubuntu-latest defaults: run: @@ -18,8 +17,19 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Extract Release Version + id: extract_release_version + run: | + RELEASE_TAG=${GITHUB_REF#refs/tags/} + RELEASE_VERSION=${RELEASE_TAG#rs/v} + if [[ ! $RELEASE_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "'$VERSION' is not a valid semver version" + exit 1 + fi + echo "Release Version: $RELEASE_VERSION" + echo "::set-output name=release_version::$RELEASE_VERSION" + - name: Say Hi run: | echo "Hello, World!" - RELEASE_TAG=${GITHUB_REF#refs/tags/} - echo "RELEASE_TAG: $RELEASE_TAG" + echo "We are about to release: ${{ steps.extract_release_version.outputs.release_version }}"