Skip to content

Semantic Release to GitHub and Ansible Galaxy #14

Semantic Release to GitHub and Ansible Galaxy

Semantic Release to GitHub and Ansible Galaxy #14

Workflow file for this run

# 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
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: .ansible/collections/ansible_collections/equinix/cloud
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@v4
with:
python-version: '3.10'
- 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: .ansible/collections/ansible_collections/equinix/cloud
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 }}