From 2196d7652528a0f5bc882571faf30ecb61de8726 Mon Sep 17 00:00:00 2001 From: Dustin Scott Date: Wed, 22 Nov 2023 11:09:51 -0600 Subject: [PATCH] ci: add github action for releasing based on tag Signed-off-by: Dustin Scott --- .github/workflows/release.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..3f2b5e8 --- /dev/null +++ b/.github/workflows/release.yaml @@ -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