From d47a294cfc889a183ddcb73154a9cb0b1c13d1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Quixada=CC=81?= Date: Sun, 2 Jul 2023 21:39:16 -0400 Subject: [PATCH] chore: release workflow now can be tested by pushing to a v3.x-test branch --- .github/workflows/release.yml | 7 ++++--- release | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cc70d33..d681021 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,13 +2,14 @@ name: v3.x releases on: push: + branches: + # Pushes to the branch below will test the release workflow without + # publishing version on npm or generating new git tags + - v3.x-test tags: - 'v3.[0-9]+.[0-9]+' - 'v3.[0-9]+.[0-9]+-alpha.[0-9]+' - 'v3.[0-9]+.[0-9]+-beta.[0-9]+' - # The "test" prerelease version exist solely to validate changes on the - # release workflow. This is intended to be published - - 'v3.[0-9]+.[0-9]+-test.[0-9]+' jobs: debug: diff --git a/release b/release index 9234338..03919fc 100755 --- a/release +++ b/release @@ -13,7 +13,7 @@ latest_major=$(echo $latest_version | cut -d. -f1) # If it's a test prerelease, we just want to test the release workflow (dry run it!) -if [[ "$workflow_version" == *"-test."* ]]; then +if [[ "$workflow_version" == *"-test"* ]]; then npm publish --tag $workflow_track --dry-run && \ exit 0 fi