From a08423b0c22d119cd02ef6e0a82f6058a0350fa4 Mon Sep 17 00:00:00 2001 From: Ujjwal Nasra <125353741+unasra@users.noreply.github.com> Date: Tue, 4 Feb 2025 02:11:12 +0530 Subject: [PATCH 1/3] release-workflow --- .github/workflows/release.yml | 23 +++++++++++++++++++++++ .gitignore | 2 ++ Makefile | 5 +++++ changelogs/config.yaml | 3 --- 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..3017fbe1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Publish Ansible Collection to Galaxy + +on: + push: + tags: + - "v*" + +jobs: + release: + name: Publish to Ansible Galaxy + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Get the version name from the tags + run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV + + - name: Publish Collection to Ansible Galaxy + uses: artis3n/ansible_galaxy_collection@v2 + with: + api_key: '${{ secrets.GALAXY_API_KEY }}' + galaxy_version: '${{ env.RELEASE_VERSION }}' \ No newline at end of file diff --git a/.gitignore b/.gitignore index 32843642..57407046 100644 --- a/.gitignore +++ b/.gitignore @@ -167,3 +167,5 @@ cython_debug/ # Ignore the Anstibull files addded dest/ + +changelogs/.plugin-cache.yaml diff --git a/Makefile b/Makefile index 96bc94bb..2da54ccf 100644 --- a/Makefile +++ b/Makefile @@ -36,3 +36,8 @@ lint: @make flynt-lint @make isort-lint @make black-lint + +.PHONY: changelog +changelog: + @echo "Generating changelog" + antsibull-changelog release -v \ No newline at end of file diff --git a/changelogs/config.yaml b/changelogs/config.yaml index 0cd57131..f0f67806 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -9,9 +9,6 @@ keep_fragments: false mention_ancestor: true new_plugins_after_name: removed_features notesdir: fragments -output_formats: -- rst -- md prelude_section_name: release_summary prelude_section_title: Release Summary sanitize_changelog: true From d156c9eba535cc69ab5e33dffbd9f0ad3e2596af Mon Sep 17 00:00:00 2001 From: Ujjwal Nasra <125353741+unasra@users.noreply.github.com> Date: Tue, 4 Feb 2025 02:18:03 +0530 Subject: [PATCH 2/3] added new line --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2da54ccf..4ed2a452 100644 --- a/Makefile +++ b/Makefile @@ -40,4 +40,4 @@ lint: .PHONY: changelog changelog: @echo "Generating changelog" - antsibull-changelog release -v \ No newline at end of file + antsibull-changelog release -v From 92fc6250e7728aa37a2a1a0dbf004f4650bbcdff Mon Sep 17 00:00:00 2001 From: Ujjwal Nasra <125353741+unasra@users.noreply.github.com> Date: Tue, 4 Feb 2025 02:19:20 +0530 Subject: [PATCH 3/3] fix indent --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3017fbe1..0f997995 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,4 +20,4 @@ jobs: uses: artis3n/ansible_galaxy_collection@v2 with: api_key: '${{ secrets.GALAXY_API_KEY }}' - galaxy_version: '${{ env.RELEASE_VERSION }}' \ No newline at end of file + galaxy_version: '${{ env.RELEASE_VERSION }}'