From 6ac13a710c781474d3ed9d032a03a3a7dce8e9c7 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 | 6 ++++++ .gitea/workflows/release.yml | 3 ++- 2 files changed, 8 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..d0a2c28 --- /dev/null +++ b/.gitea/scripts/check-tag @@ -0,0 +1,6 @@ +#!/bin/bash + +echo "$(echo $GITHUB_REF| cut -d'/' -f2)" +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: