Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/build-galaxy-collection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---

name: Build Ansible Galaxy Collection
on:
release:
types: [published]

jobs:
build-and-upload:
name: Build Collection Tarball and Upload to Release
runs-on: ubuntu-latest
permissions:
contents: rwrited
packages: write
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 --output-path dist

- name: Upload tarball to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} dist/*.tar.gz --clobber
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ __pycache__/
.ansible/
.pixi/
ansible_collections/
*.tar.gz