From 062ce0a0c299bdb45f7c8a39dfe9d13824d21ff4 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Tue, 22 Mar 2022 23:29:47 +0000 Subject: [PATCH] Github CI: Fixup release actions 1. Use `${{ }}` consistently. It is technically not required in `if` conditions but GitHub CI docs use it and it avoid certain pitfalls, such as when the value starts with `!` (making it a YAML type declaration). 2. Fixes one of the `if`s. --- .github/workflows/opendingux_release.yml | 4 ++-- .github/workflows/retrofw_release.yml | 2 +- .github/workflows/src_dist_release.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/opendingux_release.yml b/.github/workflows/opendingux_release.yml index c0c9ec237..33373efd2 100644 --- a/.github/workflows/opendingux_release.yml +++ b/.github/workflows/opendingux_release.yml @@ -37,7 +37,7 @@ jobs: path: build-rg350/devilutionx-rg350.opk - name: Update Release - if: github.event_name == 'release' && github.event.action == 'created' && ${{ !env.ACT }} + if: ${{ github.event_name == 'release' && github.event.action == 'created' && !env.ACT }} uses: ncipollo/release-action@v1 with: artifacts: "build-rg350/devilutionx-rg350.opk" @@ -78,7 +78,7 @@ jobs: path: build-lepus/devilutionx-lepus.opk - name: Update Release - if: startsWith(github.ref, 'refs/tags/') && ${{ !env.ACT }} + if: ${{ github.event_name == 'release' && github.event.action == 'created' && !env.ACT }} uses: ncipollo/release-action@v1 with: artifacts: "build-lepus/devilutionx-lepus.opk" diff --git a/.github/workflows/retrofw_release.yml b/.github/workflows/retrofw_release.yml index c66700006..332106ac1 100644 --- a/.github/workflows/retrofw_release.yml +++ b/.github/workflows/retrofw_release.yml @@ -38,7 +38,7 @@ jobs: path: build-retrofw/devilutionx-retrofw.opk - name: Update Release - if: github.event_name == 'release' && github.event.action == 'created' && ${{ !env.ACT }} + if: ${{ github.event_name == 'release' && github.event.action == 'created' && !env.ACT }} uses: ncipollo/release-action@v1 with: artifacts: "build-retrofw/devilutionx-retrofw.opk" diff --git a/.github/workflows/src_dist_release.yml b/.github/workflows/src_dist_release.yml index 4bb43bc56..54e41d04a 100644 --- a/.github/workflows/src_dist_release.yml +++ b/.github/workflows/src_dist_release.yml @@ -31,7 +31,7 @@ jobs: path: devilutionx-src.tar.xz - name: Update Release - if: github.event_name == 'release' && github.event.action == 'created' && ${{ !env.ACT }} + if: ${{ github.event_name == 'release' && github.event.action == 'created' && !env.ACT }} uses: ncipollo/release-action@v1 with: artifacts: "devilutionx-src.tar.xz"