Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/automated-tagging-versioning.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Automated Tagging and Versioning

on:
push:
branches:
- main
- dev
workflow_dispatch:

jobs:
automated-tagging-versioning:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '14'

Comment on lines +21 to +22
Copy link

Copilot AI Feb 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Node.js version is set to 14, which may no longer be supported in production environments; consider updating to a more recent LTS version (e.g., 16 or later) to ensure compatibility and security.

Suggested change
node-version: '14'
node-version: '16'

Copilot uses AI. Check for mistakes.
- name: Install Semantic Release
run: npm install -g semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github

- name: Automated Tagging and Versioning
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: semantic-release
21 changes: 21 additions & 0 deletions .github/workflows/delete-old-releases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Delete Old Releases and Tags

on:
schedule:
- cron: '0 0 * * 0' # Run every Sunday at midnight
workflow_dispatch:

jobs:
delete-old-releases:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Delete Old Releases
uses: dev-drprasad/[email protected]
with:
keep_latest: 1
delete_tags: true
delete_assets: true
23 changes: 23 additions & 0 deletions .github/workflows/generate-release-notes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Generate Release Notes

on:
release:
types: [created]

jobs:
generate-release-notes:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Generate Release Notes
id: generate_release_notes
uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml

- name: Create Release Notes
run: |
echo "Release notes generated successfully"
Comment on lines +22 to +23
Copy link

Copilot AI Feb 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'Create Release Notes' step currently only echoes a success message without actually creating or publishing the release notes; consider implementing the functionality to output or save the generated release notes.

Suggested change
run: |
echo "Release notes generated successfully"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_NOTES=$(cat release-drafter.yml)
curl -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"tag_name\": \"v1.0.0\", \"name\": \"Release v1.0.0\", \"body\": \"$RELEASE_NOTES\"}" \
https://api.github.com/repos/${{ github.repository }}/releases

Copilot uses AI. Check for mistakes.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,28 @@ Dependabot can be used to automate dependency updates for GitHub Actions. Here's

---

## Automated Deletion of Old Releases and Tags

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.

### How It Works:

1. **Third-Party GitHub Action**: A third-party GitHub Action is used to delete old releases and tags.
2. **Scheduled Workflow**: The workflow is scheduled to run periodically, ensuring that old releases and tags are deleted automatically.

### Workflow File

The workflow file `.github/workflows/delete-old-releases.yaml` is used to configure the automated deletion process. Here’s an overview of the workflow:

- **File**: `delete-old-releases.yaml`
- **Purpose**: Deletes old releases and tags.
- **Steps**:
1. **Checkout Repository**: Pulls the latest files from the repository.
2. **Delete Old Releases**: Uses a third-party GitHub Action to delete old releases and tags.
3. **Schedule Workflow**: The workflow is scheduled to run periodically.

---

## Troubleshooting Common Issues

### Network Problems
Expand Down