Release v3.3.0 #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
name: Publish collection to Ansible Galaxy | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Get the version name from the tags | |
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | |
- name: Change collection version to match tag | |
run: | | |
sed -Ei "s/^version: .*/version: ${{ env.RELEASE_VERSION }}/" galaxy.yml | |
- name: Commit galaxy.yml | |
uses: stefanzweifel/[email protected] | |
with: | |
branch: main | |
commit_message: "Update galaxy.yml for ${{ env.RELEASE_VERSION }}" | |
file_pattern: galaxy.yml | |
- name: Publish collection | |
uses: docker://ghcr.io/artis3n/ansible_galaxy_collection:v2.9.0 | |
with: | |
api_key: '${{ secrets.ANSIBLE_GALAXY_API_KEY }}' | |
galaxy_version: '${{ env.RELEASE_VERSION }}' |