Skip to content

Commit

Permalink
ci: add github action for releasing based on tag
Browse files Browse the repository at this point in the history
Signed-off-by: Dustin Scott <[email protected]>
  • Loading branch information
scottd018 committed Nov 22, 2023
1 parent 1e4a8b4 commit 2196d76
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Release
on:
push:
tags:
- '*'

jobs:
galaxy-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get Version
run: |
echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Build and Release
uses: artis3n/ansible_galaxy_collection@v2
with:
api_key: '${{ secrets.ANSIBLE_GALAXY_API_TOKEN }}'
galaxy_version: '${{ env.RELEASE_VERSION }}'
build: true
publish: true

0 comments on commit 2196d76

Please sign in to comment.