From 64db1da706d5c9d22380d59326fb682c9627ec51 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Fri, 31 Oct 2025 16:24:23 +0000 Subject: [PATCH] Create immutable action version on tag push --- .../workflows/publish-immutable-action.yml | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish-immutable-action.yml b/.github/workflows/publish-immutable-action.yml index 9350bf2b28..c6084573c0 100644 --- a/.github/workflows/publish-immutable-action.yml +++ b/.github/workflows/publish-immutable-action.yml @@ -1,8 +1,10 @@ name: 'Publish Immutable Action Version' on: - release: - types: [published] + push: + tags: + # Match version tags, but not the major version tags. + - 'v[0-9]+.**' defaults: run: @@ -17,23 +19,9 @@ jobs: packages: write steps: - - name: Check release name - id: check - env: - RELEASE_NAME: ${{ github.event.release.name }} - run: | - echo "Release name: ${{ github.event.release.name }}" - if [[ $RELEASE_NAME == v* ]]; then - echo "This is a CodeQL Action release. Create an Immutable Action" - echo "is-action-release=true" >> $GITHUB_OUTPUT - else - echo "This is a CodeQL Bundle release. Do not create an Immutable Action" - echo "is-action-release=false" >> $GITHUB_OUTPUT - fi - - name: Checking out - if: steps.check.outputs.is-action-release == 'true' + - name: Checkout repository uses: actions/checkout@v5 - - name: Publish - if: steps.check.outputs.is-action-release == 'true' + + - name: Publish immutable release id: publish uses: actions/publish-immutable-action@v0.0.4