From 0a72ef4b5a9ebba4f9ef25b819375fc086dd09f8 Mon Sep 17 00:00:00 2001 From: Ryan Pratt Date: Thu, 24 Sep 2026 16:50:56 -0600 Subject: [PATCH 1/2] Fail fast on plugin deployment with empty Store token --- .../workflows/release-cosmos-plugin-reusable.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/release-cosmos-plugin-reusable.yml b/.github/workflows/release-cosmos-plugin-reusable.yml index 29d508d..b535b03 100644 --- a/.github/workflows/release-cosmos-plugin-reusable.yml +++ b/.github/workflows/release-cosmos-plugin-reusable.yml @@ -47,6 +47,19 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Validate OPENC3_API_TOKEN + if: ${{ inputs.deploy_to_store }} + env: + OPENC3_API_TOKEN: ${{ secrets.OPENC3_API_TOKEN }} + run: | + if [ -z "$OPENC3_API_TOKEN" ]; then + echo "Error: deploy_to_store is true but the OPENC3_API_TOKEN secret is empty" + echo "Add the key to the repo secrets and pass it through, e.g." + echo " secrets:" + echo ' OPENC3_API_TOKEN: $''{{ secrets.OPENC3_API_TOKEN }}' + exit 1 + fi + - name: Validate semver format run: | if ! echo "${{ inputs.version }}" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.-]+)?(\+[a-zA-Z0-9.-]+)?$'; then From 0d18851878183c73ab342c116061d8b530ac813d Mon Sep 17 00:00:00 2001 From: Ryan Pratt Date: Thu, 24 Sep 2026 16:51:17 -0600 Subject: [PATCH 2/2] Fix deploying plugin to store with git tag that already exists --- .../workflows/release-cosmos-plugin-reusable.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-cosmos-plugin-reusable.yml b/.github/workflows/release-cosmos-plugin-reusable.yml index b535b03..58505ea 100644 --- a/.github/workflows/release-cosmos-plugin-reusable.yml +++ b/.github/workflows/release-cosmos-plugin-reusable.yml @@ -211,8 +211,17 @@ jobs: else TAG_NAME="${{ steps.plugin_info.outputs.plugin_name }}/v${{ inputs.version }}" fi - git tag -a "$TAG_NAME" -m "Release ${{ steps.plugin_info.outputs.plugin_name }} version ${{ inputs.version }}" - git push origin "$TAG_NAME" + + git fetch --tags + + if git rev-parse "$TAG_NAME" >/dev/null 2>&1; then + echo "Tag $TAG_NAME already exists, skipping tag creation" + else + git tag -a "$TAG_NAME" -m "Release ${{ steps.plugin_info.outputs.plugin_name }} version ${{ inputs.version }}" + git push origin "$TAG_NAME" + echo "Created and pushed tag $TAG_NAME" + fi + echo "tag_name=$TAG_NAME" >> "$GITHUB_OUTPUT" id: tag_info