Skip to content

Commit 832c8f4

Browse files
Automate release management with GitHub Actions
Add automated deletion of old releases and tags using GitHub Actions. * **README.md**: - Add a section about the automated deletion of old releases and tags. - Mention the new workflow file `.github/workflows/delete-old-releases.yaml`. * **.github/workflows/delete-old-releases.yaml**: - Create a new GitHub Actions workflow file to delete old releases and tags. - Use a third-party GitHub Action to delete old releases. - Schedule the workflow to run periodically. * **.github/workflows/generate-release-notes.yaml**: - Create a new GitHub Actions workflow file to generate release notes. - Use a GitHub Action to generate release notes based on commit messages and pull requests. - Configure the action to run whenever a new release is created. * **.github/workflows/automated-tagging-versioning.yaml**: - Create a new GitHub Actions workflow file to automate tagging and versioning. - Implement a GitHub Action to automatically tag and version releases based on commit messages. - Use semantic versioning to ensure meaningful and consistent version numbers. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Githubguy132010/Arch-Linux-without-the-beeps?shareId=XXXX-XXXX-XXXX-XXXX).
1 parent db99043 commit 832c8f4

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Automated Tagging and Versioning
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
workflow_dispatch:
9+
10+
jobs:
11+
automated-tagging-versioning:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '14'
22+
23+
- name: Install Semantic Release
24+
run: npm install -g semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github
25+
26+
- name: Automated Tagging and Versioning
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: semantic-release
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Delete Old Releases and Tags
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # Run every Sunday at midnight
6+
workflow_dispatch:
7+
8+
jobs:
9+
delete-old-releases:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
16+
- name: Delete Old Releases
17+
uses: dev-drprasad/[email protected]
18+
with:
19+
keep_latest: 1
20+
delete_tags: true
21+
delete_assets: true
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Generate Release Notes
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
generate-release-notes:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
15+
- name: Generate Release Notes
16+
id: generate_release_notes
17+
uses: release-drafter/release-drafter@v5
18+
with:
19+
config-name: release-drafter.yml
20+
21+
- name: Create Release Notes
22+
run: |
23+
echo "Release notes generated successfully"

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,28 @@ Dependabot can be used to automate dependency updates for GitHub Actions. Here's
167167

168168
---
169169

170+
## Automated Deletion of Old Releases and Tags
171+
172+
To keep your repository clean and manageable, you can automate the deletion of old releases and tags using GitHub Actions. This ensures that only the most recent releases are retained, reducing clutter and potential confusion.
173+
174+
### How It Works:
175+
176+
1. **Third-Party GitHub Action**: A third-party GitHub Action is used to delete old releases and tags.
177+
2. **Scheduled Workflow**: The workflow is scheduled to run periodically, ensuring that old releases and tags are deleted automatically.
178+
179+
### Workflow File
180+
181+
The workflow file `.github/workflows/delete-old-releases.yaml` is used to configure the automated deletion process. Here’s an overview of the workflow:
182+
183+
- **File**: `delete-old-releases.yaml`
184+
- **Purpose**: Deletes old releases and tags.
185+
- **Steps**:
186+
1. **Checkout Repository**: Pulls the latest files from the repository.
187+
2. **Delete Old Releases**: Uses a third-party GitHub Action to delete old releases and tags.
188+
3. **Schedule Workflow**: The workflow is scheduled to run periodically.
189+
190+
---
191+
170192
## Troubleshooting Common Issues
171193

172194
### Network Problems

0 commit comments

Comments
 (0)