From 2e5cd72a8da35a259d3e34dbfed2f1eda7394223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20H=C3=B6sel?= Date: Wed, 25 May 2022 22:17:13 +0200 Subject: [PATCH] fix publishing to galaxy --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d887beb..c065a32 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,10 +138,11 @@ jobs: python -m pip install --upgrade pip python -m pip install -r requirements.txt - - name: Build collection and rename the archive + - name: Build collection and get tarball filename + id: collection_build run: | ansible-galaxy collection build --force - mv *.tar.gz collection.tar.gz + echo "::set-output name=collection-tarball::$(ls | grep ".tar.gz")" - name: Get current release id: get_release @@ -156,9 +157,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: collection.tar.gz + asset_path: ${{ steps.collection_build.outputs.collection-tarball }} asset_name: ${{ github.event.repository.name }}-${{ steps.get_release.outputs.tag_name }}.tar.gz asset_content_type: application/tar+gzip - name: Deploy Ansible collection to Galaxy - run: ansible-galaxy collection publish collection.tar.gz --api-key ${{ secrets.GALAXY_API_KEY }} + run: ansible-galaxy collection publish ${{ steps.collection_build.outputs.collection-tarball }} --api-key ${{ secrets.GALAXY_API_KEY }}