Publish releases #92
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 releases | |
permissions: | |
contents: write | |
on: | |
create: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
container: | |
image: python:3.11-alpine | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Publish collection to ansible galaxy | |
env: | |
GALAXY_API_KEY: "${{ secrets.galaxy_api_key }}" | |
run: | | |
set -ex | |
apk add --update --no-cache --virtual build_dependencies gcc musl-dev libffi-dev openssl-dev rust cargo | |
pip install --no-cache-dir ansible-core | |
sed -i "s/0.0.0/${GITHUB_REF_NAME/v/}/" galaxy.yml | |
ansible-galaxy collection build --output-path ./build | |
ansible-galaxy collection publish --token ${GALAXY_API_KEY} $(find ./build/ -type f) | |
- name: Release to github | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ./build | |
generate_release_notes: true |