Skip to content

Commit

Permalink
Add a workflow (+actions) to automatically generate the GitHub Releas…
Browse files Browse the repository at this point in the history
…e when a valid tag is pushed (#1696) (#1733)

[PR #1696/fe7057be backport][stable-6] Add a workflow (+actions) to automatically generate the GitHub Release when a valid tag is pushed

This is a backport of PR #1696 as merged into main (fe7057b).
SUMMARY
Automatically generate the GitHub release when we push a valid tag.  (Because we keep forgetting)
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
.github/
ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell
  • Loading branch information
patchback[bot] authored Sep 6, 2023
1 parent bd60bae commit 942d4a6
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Generate GitHub Release (manual trigger)
concurrency:
group: release-${{ github.head_ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
release:
required: true
description: 'Release to generate'
type: string

jobs:
generate-release-log:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Generate Release Log
uses: ansible-collections/amazon.aws/.github/actions/ansible_release_log@main
with:
release: ${{ inputs.release }}

perform-release:
permissions:
contents: write
runs-on: ubuntu-latest
needs:
- generate-release-log
steps:
- name: Generate Release
uses: ansible-collections/amazon.aws/.github/actions/ansible_release_tag@main
with:
release: ${{ inputs.release }}
collection-name: amazon.aws
32 changes: 32 additions & 0 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Generate GitHub Release
concurrency:
group: release-${{ github.head_ref }}
cancel-in-progress: true
on:
push:
tags:
- '*'

jobs:
generate-release-log:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Generate Release Log
uses: ansible-collections/amazon.aws/.github/actions/ansible_release_log@main
with:
release: ${{ github.ref_name }}

perform-release:
permissions:
contents: write
runs-on: ubuntu-latest
needs:
- generate-release-log
steps:
- name: Generate Release
uses: ansible-collections/amazon.aws/.github/actions/ansible_release_tag@main
with:
release: ${{ github.ref_name }}
collection-name: amazon.aws
5 changes: 3 additions & 2 deletions docs/docsite/rst/collection_release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,9 @@ assistance from a member of Ansible staff.
Create a GitHub "Release"
-------------------------

While the AWS collections are generally distributed via Ansible Galaxy it can be helpful to create
a release in GitHub for visibility.
While the AWS collections are generally distributed via Ansible Galaxy, for visibility we also
create a GitHub release. Pushing a tag should automatically do this, however, should the automation
fail, releases can also be created manually.

Copy the release notes from the rendered changelog file and generate a GitHub release based upon the
newly created tag.
Expand Down

0 comments on commit 942d4a6

Please sign in to comment.