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