geoffreyvanwyk.moodle 1.0.0 #4
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
--- | |
# This file is part of Ansible collection geoffreyvanwyk.moodle. | |
# | |
# Ansible collection geoffreyvanwyk.moodle is free software: you can | |
# redistribute it and/or modify it under the terms of the GNU General Public | |
# License as published by the Free Software Foundation, either version 3 of the | |
# License, or (at your option) any later version. | |
# | |
# Ansible collection geoffreyvanwyk.moodle is distributed in the hope that it | |
# will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty | |
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General | |
# Public License for more details. | |
# | |
# You should have received a copy of the GNU General Public License along with | |
# Ansible collection geoffreyvanwyk.moodle. If not, see | |
# <https://www.gnu.org/licenses/>. | |
## | |
# Publishes a new version (as specified with a Git tag) of the collection to | |
# Ansible galaxy. | |
# | |
# It requires a GALAXY_API_KEY secret present in the GitHub repository or | |
# organizaton settings. The API key can be obtained from the Preferences page of | |
# your Ansible Galaxy profile. | |
# | |
# @copyright 2023 Geoffrey Bernardo van Wyk (https://geoffreyvanwyk.dev) | |
# @see GitHub Actions {@link https://docs.github.com/en/actions} | |
## | |
name: Publish | |
on: # yamllint disable-line rule:truthy | |
release: | |
types: | |
- published | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out the codebase | |
uses: actions/checkout@v2 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install Ansible | |
run: pip3 install ansible | |
- name: Build artifact | |
run: ansible-galaxy collection build | |
- name: Trigger a new import on Galaxy | |
run: >- | |
ansible-galaxy collection publish -vvv | |
--api-key ${{ secrets.GALAXY_API_KEY }} | |
geoffreyvanwyk-moodle-${{ github.ref_name }}.tar.gz |