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