From 186206bb954e84fcbc2eef7e9f7ae8777a6cb15f Mon Sep 17 00:00:00 2001 From: Ruslan Pislari Date: Mon, 5 Aug 2024 15:08:44 +0300 Subject: [PATCH] fix: adding tag creation --- .github/workflows/cd.yaml | 9 ++++++++- .github/workflows/ci.yaml | 7 ++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 221ed14..070f6ee 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -20,15 +20,22 @@ jobs: with: submodules: recursive + - name: Get package tag + run: | + cargo install cargo-get + echo "TAG=v`cargo get package.version`" >> $GITHUB_ENV + echo "tag name $TAG" + - name: Create tag uses: rickstaa/action-create-tag@v1 with: - tag: "latest" + tag: $TAG tag_exists_error: true message: "Latest release" build-and-upload: name: Build and upload + needs: create-tag runs-on: ${{ matrix.os }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e5dd74c..d3abba5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,9 @@ name: Continuous Integration -on: [ push ] - +on: + push: + branches-ignore: + - 'main' env: CARGO_TERM_COLOR: always RUSTFLAGS: "-Dwarnings" @@ -9,7 +11,6 @@ env: jobs: build: runs-on: ubuntu-latest - if: github.ref != 'refs/heads/main' steps: - name: Clone repo