Skip to content

Commit

Permalink
Add publish workflow, rename galaxy.yaml to yml.
Browse files Browse the repository at this point in the history
The publish workflow packages the collection, then attempts to publish
it using the release tag name stripped of its leading "v". If the tag
name and the galaxy.yml version name do not match, ansible-galaxy will
fail to find the tarball.
  • Loading branch information
Christopher Palmer-Richez committed Aug 1, 2024
1 parent 7d81179 commit 07450ad
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- name: Deploy collection to galaxy
on:
release:
types:
- released

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: checkout@v4
with:
ref: ${{ github.ref }}

- name: Build collection
run: ansible-galaxy collection build

- name: Get expected version string
shell: VERSION=$(echo "${{ github.ref_name }}" | sed -e 's/v([0-9]*\.?){3}/\1/')

- name: Publish to Galaxy
run: ansible-galaxy collection publish tofugarden-secureboot-$VERSION.tar.gz --token ${{ secrets.GALAXY_API_KEY }}
File renamed without changes.

0 comments on commit 07450ad

Please sign in to comment.