-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from alisaitteke/develop
Develop
- Loading branch information
Showing
2 changed files
with
84 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,61 @@ | ||
# Automatically creates and updates release drafts when PRs are merged | ||
name: Release Drafter | ||
|
||
# Triggers the workflow on push to master and on PR activities | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
branches: [ master ] | ||
# Manual trigger option | ||
workflow_dispatch: | ||
|
||
# Define required permissions for the workflow | ||
permissions: | ||
# Required permissions for release and milestone management | ||
contents: write # Allows creating releases | ||
pull-requests: write # Allows reading and labeling PRs | ||
issues: write # Allows managing related issues | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
# Checkout repository with full history | ||
- uses: actions/checkout@v4 | ||
with: | ||
config-name: release-drafter.yml | ||
fetch-depth: 0 | ||
|
||
# Run release drafter action | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
# Configuration options | ||
config-name: release-drafter.yml # Path to config file | ||
disable-autolabeler: false # Enable automatic PR labeling | ||
tag-template: 'v$RESOLVED_VERSION' # Version tag format | ||
version-template: '$MAJOR.$MINOR.$PATCH' # Version number format | ||
publish: false # Create as draft only | ||
prerelease: false # Mark as stable release | ||
commitish: master # Target branch | ||
|
||
# Optional: Update changelog file in repository | ||
update_changelog: | ||
needs: update_release_draft | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Update Changelog | ||
run: | | ||
if [ -f CHANGELOG.md ]; then | ||
echo "Updating CHANGELOG.md" | ||
# Add changelog update commands here if needed | ||
else | ||
echo "CHANGELOG.md not found" | ||
fi |