Skip to content

Commit

Permalink
Add Galaxy publication in GitHub action.
Browse files Browse the repository at this point in the history
  • Loading branch information
JGoutin committed Mar 30, 2022
1 parent 3656708 commit 6876ffa
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,31 @@ jobs:
- name: Python code maintenability
run: radon mi -n B .
if: ${{ always() }}

publish:
runs-on: ubuntu-latest
if: ${{ github.repository == 'JGoutin/ansible_home' && github.ref_type == 'tag' }}
needs: [static-analysis]
environment: Ansible Galaxy
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.x

- name: Install dependencies
run: pip install -q --disable-pip-version-check ansible

- name: Build
run: ansible-galaxy collection build -vvv

- name: Publish
run: "ansible-galaxy collection publish jgoutin-home-*.tar.gz --token ${{ secrets.ANSIBLE_GALAXY_TOKEN }}"

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
7 changes: 4 additions & 3 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace: jgoutin
name: home
description: Home free software self-hosting.
version: 1.4.0
version: 2.0.0
readme: readme.md
authors:
- jgoutin
Expand Down Expand Up @@ -42,12 +42,13 @@ build_ignore:
- .settings
- .spyderproject
- .spyproject
- ".vscode/*"
- ".vagrant/*"
- .vscode
- .vagrant
- Vagrantfile
- playbook.yml
- "*-playbook.yml"
- "*.tar.gz"
- tests
- _config.yml
- index.md
- "*.sh"
2 changes: 2 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
requires_ansible: '>=2.12'

0 comments on commit 6876ffa

Please sign in to comment.