From 2411d2151612b4387f717c12cad58463c737aee4 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Andres <11448715+al3mart@users.noreply.github.com> Date: Wed, 21 Aug 2024 22:31:39 +0200 Subject: [PATCH 1/2] conditional release builds --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c82d1b9f..4210497d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ env: on: release: - types: [ published ] + types: [published] workflow_dispatch: inputs: ref: @@ -23,12 +23,12 @@ on: jobs: srtool: runs-on: ubuntu-latest - if: github.event_name != 'workflow_dispatch' && 'true' || inputs.runtime + if: github.event_name != 'workflow_dispatch' && 'true' || inputs.runtime || startsWith(github.ref, 'refs/tags/runtime-') permissions: contents: write strategy: matrix: - runtime: [ "devnet", "testnet" ] + runtime: ["devnet", "testnet"] steps: - name: Checkout sources uses: actions/checkout@v4 @@ -120,7 +120,7 @@ jobs: build-node: runs-on: ${{ matrix.platform.os }} - if: github.event_name != 'workflow_dispatch' && 'true' || inputs.node + if: github.event_name != 'workflow_dispatch' && 'true' || inputs.node || startsWith(github.ref, 'refs/tags/node-') permissions: contents: write strategy: From 1078dc1763ed928c802b956a3f2bdce57a135082 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Andres <11448715+al3mart@users.noreply.github.com> Date: Tue, 27 Aug 2024 12:30:41 +0200 Subject: [PATCH 2/2] remove \- from regex --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4210497d..2d17d3a0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ on: jobs: srtool: runs-on: ubuntu-latest - if: github.event_name != 'workflow_dispatch' && 'true' || inputs.runtime || startsWith(github.ref, 'refs/tags/runtime-') + if: github.event_name != 'workflow_dispatch' && 'true' || inputs.runtime || startsWith(github.ref, 'refs/tags/runtime') permissions: contents: write strategy: @@ -120,7 +120,7 @@ jobs: build-node: runs-on: ${{ matrix.platform.os }} - if: github.event_name != 'workflow_dispatch' && 'true' || inputs.node || startsWith(github.ref, 'refs/tags/node-') + if: github.event_name != 'workflow_dispatch' && 'true' || inputs.node || startsWith(github.ref, 'refs/tags/node') permissions: contents: write strategy: