Skip to content

Commit

Permalink
ci: add a release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
artis3n committed Mar 9, 2024
1 parent 4c03df0 commit 1f30fc2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

- name: Set up Python 3.x
id: setup-python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
cache: 'poetry'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: Set up Python 3.x
id: setup-python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
cache: 'poetry'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:

- name: Set up Python 3.x
id: setup-python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
cache: 'poetry'
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish to Ansible Galaxy

on:
release:
types:
- published

workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install dependency manager
run: pipx install poetry

- name: Set up Python 3.x
id: setup-python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
cache: 'poetry'

- name: Install packages
run: poetry install --no-interaction

- name: Publish to Ansible Galaxy
run: |
poetry run ansible-galaxy role import --token ${{ secrets.ANSIBLE_GALAXY_TOKEN }} artis3n tailscale

0 comments on commit 1f30fc2

Please sign in to comment.