Skip to content

Commit

Permalink
Initial solution for auto bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinpraczko committed Nov 2, 2024
1 parent ed9ddd8 commit 8dadd9b
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions .github/workflows/release-to-galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: Release to Ansible Galaxy

on:
push:
workflow_dispatch: # Triggered manually

permissions:
actions: 'read'
contents: 'write'

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -11,7 +16,29 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Import role to Ansible Galaxy
run: ansible-galaxy role import marcinpraczko ansible-goss-install --role-name goss-install --token $ANSIBLE_GALAXY_TOKEN
env:
ANSIBLE_GALAXY_TOKEN: ${{ secrets.ANSIBLE_GALAXY_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install bump2version
- name: Bump version
run: make bump-version-patch

- name: Push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git push --follow-tags
# - name: Import role to Ansible Galaxy
# run: |
# ansible-galaxy role import marcinpraczko ansible-goss-install \
# --role-name goss-install \
# --token $ANSIBLE_GALAXY_TOKEN
# env:
# ANSIBLE_GALAXY_TOKEN: ${{ secrets.ANSIBLE_GALAXY_TOKEN }}

0 comments on commit 8dadd9b

Please sign in to comment.