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
22 changes: 18 additions & 4 deletions .github/workflows/publish-to-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,32 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ github.event.release.tag_name }}
fetch-depth: 0

- name: Create ZIP file
run: |
if [ ! -d src ]; then
echo "src directory not found"
exit 1
fi
cd src
zip -r ../scrum-helper.zip .
zip -r ../scrum-helper.zip . >/dev/null
echo "Created zip:"
unzip -l ../scrum-helper.zip
if unzip -l ../scrum-helper.zip | awk '{print $4}' | grep -q '^manifest.json$'; then
echo "manifest.json is at zip root"
else
echo "ERROR: manifest.json NOT at zip root; zip will fail on Chrome Web Store"
exit 1
fi

- name: Upload to Chrome Web Store
- name: Upload and Publish 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
zip: scrum-helper.zip
publish: true
101 changes: 62 additions & 39 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master

pull_request:
types: [opened, reopened, synchronize]

Expand All @@ -15,61 +13,86 @@ permissions:
jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

# Drafts your next Release notes as Pull Requests are merged into "master"
- name: Draft Release
id: release_drafter
uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter.yml
publish: false
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Ensure correct branch is checked out (only on PR)
if: github.event_name == 'pull_request'
- name: Debug release-drafter outputs (safe)
run: |
echo "Checking out PR source branch: ${{ github.head_ref }}"
git fetch origin ${{ github.head_ref }}
git checkout ${{ github.head_ref }}

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
printf 'release-drafter.tag_name=%s\n' "${{ steps.release_drafter.outputs.tag_name }}"
echo 'release-drafter.body:'
printf '%s\n' "${{ steps.release_drafter.outputs.body }}" > /tmp/release_drafter_body.txt
echo "Wrote release body to /tmp/release_drafter_body.txt"

- name: Update Changelog
- name: Create / prepend CHANGELOG entry
if: steps.release_drafter.outputs.tag_name != ''
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
TAG="${{ steps.release_drafter.outputs.tag_name }}"
BODY_FILE="/tmp/release_drafter_body.txt"
DATE="$(date +%F)"
if [ -f "$BODY_FILE" ]; then
BODY="$(cat "$BODY_FILE")"
else
BODY="${{ steps.release_drafter.outputs.body }}"
fi
printf "## %s - %s\n\n%s\n\n---\n\n" "$TAG" "$DATE" "$BODY" > /tmp/new_changelog.md
if [ -f CHANGELOG.md ]; then
cat CHANGELOG.md >> new_changelog_entry.md
cat CHANGELOG.md >> /tmp/new_changelog.md
fi
mv new_changelog_entry.md CHANGELOG.md
mv /tmp/new_changelog.md CHANGELOG.md
git status --porcelain || true

# 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 }}
- name: Commit & push CHANGELOG and tag via GITHUB_TOKEN
if: steps.release_drafter.outputs.tag_name != ''
env:
TAG: ${{ steps.release_drafter.outputs.tag_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git add CHANGELOG.md || true

if git diff --cached --quiet; then
echo "No CHANGELOG.md changes to commit"
else
git commit -m "docs(changelog): update for ${TAG}"
fi

REPO="${{ github.repository }}"

# Push commit (use token to authenticate)
git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${REPO}.git" HEAD:refs/heads/master

# Create annotated tag if missing and push it
if git rev-parse "${TAG}" >/dev/null 2>&1; then
echo "Tag ${TAG} already exists locally"
else
git tag -a "${TAG}" -m "Release ${TAG}" || true
fi
git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${REPO}.git" "refs/tags/${TAG}" || echo "Tag push failed or tag exists"


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

- name: (Optional) Update Changelog formatting / run scripts
run: |
# placeholder for any project-specific changelog formatting commands
echo "Changelog updated; no additional formatting configured"
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## v0.1.2 - 2025-09-08

## What's Changed

* No changes

---

## v0.1.2 (2025-09-08)

## What's Changed

* No changes



## v1.0.4 (2025-08-29)

## What's Changed
Expand Down