Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
28 changes: 19 additions & 9 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
name-template: 'v$RESOLVED_VERSION 🌈'
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: 'πŸš€ Features'
- title: 'Features'
labels:
- 'feature'
- 'enhancement'
- title: 'πŸ› Bug Fixes'
- title: 'Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
labels: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
- title: 'Maintenance'
labels:
- 'chore'
- 'dependencies'
- 'ci'
- 'refactor'
template: |
## What's Changed

$CHANGES

change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
Expand All @@ -24,8 +32,10 @@ version-resolver:
patch:
labels:
- 'patch'
- 'fix'
- 'documentation'
- 'chore'
default: patch
template: |
## Changes

$CHANGES
exclude-labels:
- 'skip-changelog'
28 changes: 28 additions & 0 deletions .github/workflows/publish-to-chrome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish to Chrome Web Store

on:
release:
types: [published] # triggers when a release is published manually

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}

- name: Create ZIP file
run: |
cd src
zip -r ../scrum-helper.zip .

- name: Upload to Chrome Web Store
uses: PlasmoHQ/chrome-extension@v3
with:
client_id: ${{ secrets.CHROME_CLIENT_ID }}
client_secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh_token: ${{ secrets.CHROME_REFRESH_TOKEN }}
extension_id: ${{ secrets.CHROME_EXTENSION_ID }}
zip: scrum-helper.zip
58 changes: 42 additions & 16 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@ on:
branches:
- master

# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
# pull_request_target event is required for autolabeler to support PRs from forks
# pull_request_target:
# types: [opened, reopened, synchronize]

permissions:
contents: read
Expand All @@ -23,20 +18,51 @@ jobs:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/[email protected]
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
- name: Draft Release
id: release_drafter
uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter.yml
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Update Changelog
run: |
VERSION="${{ steps.release_drafter.outputs.tag_name }}"
BODY="${{ steps.release_drafter.outputs.body }}"

# Create a new changelog entry file
echo -e "## ${VERSION} ($(date +'%Y-%m-%d'))\n\n${BODY}\n\n" > new_changelog_entry.md

# Prepend the new entry to the existing CHANGELOG.md
if [ -f CHANGELOG.md ]; then
cat CHANGELOG.md >> new_changelog_entry.md
fi
mv new_changelog_entry.md CHANGELOG.md

# Commits the updated CHANGELOG.md and creates a tag for the new version
- name: Commit and Push Changelog
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'docs: Update CHANGELOG.md for ${{ steps.release_drafter.outputs.tag_name }}'
file_pattern: 'CHANGELOG.md'
tagging_message: ${{ steps.release_drafter.outputs.tag_name }}
Comment on lines +67 to +72
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (bug_risk): Automatically committing and tagging from within the workflow may create tags that conflict with those created by the release-drafter action.

Coordinate tag creation between this step and the release-drafter action to avoid duplicate tags or push errors. Consider adding logic to skip tag creation if the tag already exists.




Loading