Skip to content

Commit

Permalink
Create publish.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanth-lingappa committed Sep 26, 2023
1 parent 8dec0be commit b01ac6c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Ansible collection publish
on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: "Install tools"
run: "python -m pip install ansible-base --disable-pip-version-check"

- name: "Build the collection"
run: ansible-galaxy collection build

- name: "Upload built collection to release"
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: netscaler-adc-*.tar.gz
file_glob: true
tag: ${{ github.ref }}
overwrite: true

- name: "Publish collection on galaxy"
uses: ansible/[email protected]
with:
api_key: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}

0 comments on commit b01ac6c

Please sign in to comment.