From 8b8d5531f4f3614329a280834ae47224ea4b7e29 Mon Sep 17 00:00:00 2001 From: Jakub Wlodek Date: Wed, 18 Feb 2026 16:03:43 -0500 Subject: [PATCH 1/5] Add github action to build collection and attach built collection to release --- .github/workflows/build-galaxy-collection.yml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build-galaxy-collection.yml diff --git a/.github/workflows/build-galaxy-collection.yml b/.github/workflows/build-galaxy-collection.yml new file mode 100644 index 00000000..3d0c96d7 --- /dev/null +++ b/.github/workflows/build-galaxy-collection.yml @@ -0,0 +1,37 @@ +--- + +name: Build Ansible Galaxy Collection +permissions: + contents: read + packages: read +on: + release: + types: [published] + +jobs: + build-and-publish: + name: Build and Publish Collection + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Setup Pixi + uses: prefix-dev/setup-pixi@8ca4608ef7f4daeb54f5205b20d0b7cb42f11143 # yamllint disable-line rule:line-length + with: + pixi-version: v0.55.0 + cache: false + frozen: true + + - name: Run ansible galaxy collection build + run: | + pixi run ansible-galaxy collection build + + - name: Upload tarball to GitHub Release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release upload ${{ github.event.release.tag_name }} ./*.tar.gz --clobber From fd11092319f7a3c36e052a315a1b3b5ee49c4db6 Mon Sep 17 00:00:00 2001 From: Jakub Wlodek Date: Wed, 18 Feb 2026 16:04:26 -0500 Subject: [PATCH 2/5] Minor typo fixed --- .github/workflows/build-galaxy-collection.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-galaxy-collection.yml b/.github/workflows/build-galaxy-collection.yml index 3d0c96d7..26085290 100644 --- a/.github/workflows/build-galaxy-collection.yml +++ b/.github/workflows/build-galaxy-collection.yml @@ -28,7 +28,7 @@ jobs: - name: Run ansible galaxy collection build run: | - pixi run ansible-galaxy collection build + pixi run ansible-galaxy collection build . - name: Upload tarball to GitHub Release env: From c350068a90dff3c30b1565442213c0d43d9c5b62 Mon Sep 17 00:00:00 2001 From: Jakub Wlodek Date: Wed, 18 Feb 2026 16:08:49 -0500 Subject: [PATCH 3/5] Update gitignore, set correct permissions on new workflow --- .github/workflows/build-galaxy-collection.yml | 8 ++++---- .gitignore | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-galaxy-collection.yml b/.github/workflows/build-galaxy-collection.yml index 26085290..f3abc09f 100644 --- a/.github/workflows/build-galaxy-collection.yml +++ b/.github/workflows/build-galaxy-collection.yml @@ -1,9 +1,6 @@ --- name: Build Ansible Galaxy Collection -permissions: - contents: read - packages: read on: release: types: [published] @@ -12,6 +9,9 @@ jobs: build-and-publish: name: Build and Publish Collection runs-on: ubuntu-latest + permissions: + contents: rwrited + packages: write steps: - name: Checkout Code uses: actions/checkout@v4 @@ -28,7 +28,7 @@ jobs: - name: Run ansible galaxy collection build run: | - pixi run ansible-galaxy collection build . + pixi run ansible-galaxy collection build - name: Upload tarball to GitHub Release env: diff --git a/.gitignore b/.gitignore index e6ec890e..64b3fc2e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ __pycache__/ .ansible/ .pixi/ ansible_collections/ +*.tar.gz From d8bf81287db5cdd1d76a08674bd57a2729b5fbef Mon Sep 17 00:00:00 2001 From: Jakub Wlodek Date: Wed, 18 Feb 2026 16:09:37 -0500 Subject: [PATCH 4/5] Update .github/workflows/build-galaxy-collection.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build-galaxy-collection.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-galaxy-collection.yml b/.github/workflows/build-galaxy-collection.yml index f3abc09f..510db8c7 100644 --- a/.github/workflows/build-galaxy-collection.yml +++ b/.github/workflows/build-galaxy-collection.yml @@ -6,8 +6,8 @@ on: types: [published] jobs: - build-and-publish: - name: Build and Publish Collection + build-and-upload: + name: Build Collection Tarball and Upload to Release runs-on: ubuntu-latest permissions: contents: rwrited From ff0805881aca6ac7e178e62418ba77bb8f03fcad Mon Sep 17 00:00:00 2001 From: Jakub Wlodek Date: Wed, 18 Feb 2026 16:10:05 -0500 Subject: [PATCH 5/5] Update .github/workflows/build-galaxy-collection.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/build-galaxy-collection.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-galaxy-collection.yml b/.github/workflows/build-galaxy-collection.yml index 510db8c7..1a18718d 100644 --- a/.github/workflows/build-galaxy-collection.yml +++ b/.github/workflows/build-galaxy-collection.yml @@ -28,10 +28,10 @@ jobs: - name: Run ansible galaxy collection build run: | - pixi run ansible-galaxy collection build + pixi run ansible-galaxy collection build --output-path dist - name: Upload tarball to GitHub Release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh release upload ${{ github.event.release.tag_name }} ./*.tar.gz --clobber + gh release upload ${{ github.event.release.tag_name }} dist/*.tar.gz --clobber