diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 674bcb2..9bf5f15 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -40,14 +40,24 @@ jobs: COLLECTION_FILE=$(ls *.tar.gz) echo "COLLECTION_FILE=${COLLECTION_FILE}" >> $GITHUB_ENV + # Create a release + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v1 + with: + tag: ${{ github.ref }} # Use the pushed tag + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub Actions + # Upload the collection file to the release - name: Upload Release Asset - uses: actions/upload-release-asset@v1 + uses: softprops/action-gh-release@v1 with: - upload_url: "${{ github.event.release.upload_url }}" - asset_path: "${{ env.COLLECTION_FILE }}" - asset_name: "${{ env.COLLECTION_FILE }}" - asset_content_type: application/gzip + tag: ${{ github.ref }} # Use the same tag + files: ${{ env.COLLECTION_FILE }} # The file to upload + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub Actions + # Publish the collection to Ansible Galaxy - name: Publish to Ansible Galaxy