From 32dc073452c3188ab2a28665c51c3d0f3f89812a Mon Sep 17 00:00:00 2001 From: Steffen Scheib Date: Sun, 17 Mar 2024 23:07:44 +0100 Subject: [PATCH] Shortening CI name for galaxy; Adding semantic versioning for tag matching --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23572429..2e2dcb65 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,9 @@ --- -name: 'Publish latest release to Ansible Galaxy and create a new GitHub release' +name: 'Publish to Ansible Galaxy' on: # yamllint disable-line rule:truthy push: tags: - - 'v*' + - 'v[0-9]+.[0-9]+.[0-9]+' workflow_dispatch: {} jobs: @@ -13,18 +13,18 @@ jobs: steps: - name: 'checkout' uses: 'actions/checkout@v4' - if: "${{ github.ref_name == 'main' }}" + if: "${{ github.ref == 'refs/heads/main' }}" - name: 'galaxy' uses: 'robertdebock/galaxy-action@1.2.0' - if: "${{ github.ref_name == 'main' }}" + if: "${{ github.ref == 'refs/heads/main' }}" with: galaxy_api_key: '${{ secrets.galaxy_api_key }}' git_branch: 'main' - name: 'Create a new release on GitHub' uses: 'softprops/action-gh-release@v2' - if: "${{ github.ref_name == 'main' }}" + if: "${{ github.ref == 'refs/heads/main' }}" with: draft: false prerelease: false