From 4d6fd20f149c4a3a23a9935283e9c936d16e031a Mon Sep 17 00:00:00 2001 From: chmanie Date: Mon, 12 Jun 2023 21:36:20 +0200 Subject: [PATCH] Fail release workflow if not in tags --- .gitea/scripts/check-tag | 5 +++++ .gitea/workflows/release.yml | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 .gitea/scripts/check-tag diff --git a/.gitea/scripts/check-tag b/.gitea/scripts/check-tag new file mode 100755 index 0000000..61dc45c --- /dev/null +++ b/.gitea/scripts/check-tag @@ -0,0 +1,5 @@ +#!/bin/bash + +if [ "$(echo $GITHUB_REF| cut -d'/' -f2)" == "tags" ]; then + exit 1; +fi diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 23f8537..9dd301e 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -10,11 +10,12 @@ jobs: runs-on: rust-cross name: stable / cross-${{ matrix.target }} strategy: - fail-fast: false + fail-fast: true matrix: target: ["armv7-unknown-linux-gnueabihf", "aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu"] steps: - uses: actions/checkout@v3 + - run: .gitea/scripts/check-tag - run: cargo fmt --check - uses: https://github.com/Swatinem/rust-cache@v2 with: