Semantic Release to GitHub and Ansible Galaxy #28
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 GitHub action creates new release and uploads new collection version to | |
# Ansible Galaxy | |
name: Semantic Release to GitHub and Ansible Galaxy | |
on: | |
workflow_dispatch: null | |
env: | |
COLLECTION_PATH: .ansible/collections/ansible_collections/equinix/cloud | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: .ansible/collections/ansible_collections/equinix/cloud | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.COLLECTION_PATH }} | |
fetch-depth: 0 | |
ssh-key: ${{ secrets.DEPLOY_KEY }} | |
- name: update packages | |
run: sudo apt-get update -y | |
- name: install make | |
run: sudo apt-get install -y build-essential | |
- name: setup python 3 | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: ${{ env.COLLECTION_PATH }}/.python-version | |
- name: install dependencies | |
run: pip3 install -r requirements-dev.txt -r requirements.txt | |
- name: Do GitHub release | |
uses: cycjimmy/semantic-release-action@v4 | |
with: | |
working_directory: ${{ env.COLLECTION_PATH }} | |
semantic_version: 19.0.5 | |
extra_plugins: | | |
@semantic-release/exec@6.0.3 | |
@semantic-release/git@10.0.0 | |
conventional-changelog-conventionalcommits@4.6.3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_AUTHOR_NAME: equinix-labs@auto-commit-workflow | |
GIT_AUTHOR_EMAIL: bot@equinix.noreply.github.com | |
GIT_COMMITTER_NAME: equinix-labs@auto-commit-workflow | |
GIT_COMMITTER_EMAIL: bot@equinix.noreply.github.com | |
- name: publish the collection | |
run: make publish | |
env: | |
GALAXY_TOKEN: ${{ secrets.GALAXY_TOKEN }} | |
COLLECTION_VERSION: ${{ github.event.release.tag_name }} |