From 41986f2689742b6bb204ae4cc1a99cbb5bc6409e Mon Sep 17 00:00:00 2001 From: vedansh-5 <77830698+vedansh-5@users.noreply.github.com> Date: Mon, 8 Sep 2025 09:22:34 +0000 Subject: [PATCH 1/7] docs: Update CHANGELOG.md for v0.1.2 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 502adc0a..270d349a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v0.1.2 (2025-09-08) + +## What's Changed + +* No changes + + + ## v1.0.4 (2025-08-29) ## What's Changed From ac10f6b79acfe3094e509b9d65c2514945d8c66a Mon Sep 17 00:00:00 2001 From: Vedansh Saini <77830698+vedansh-5@users.noreply.github.com> Date: Mon, 8 Sep 2025 15:16:31 +0530 Subject: [PATCH 2/7] publish on chrome on manual release Signed-off-by: Vedansh Saini <77830698+vedansh-5@users.noreply.github.com> --- .github/workflows/publish-to-chrome.yml | 22 ++++++++++--- .github/workflows/release-drafter.yml | 42 +++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-to-chrome.yml b/.github/workflows/publish-to-chrome.yml index fe99632e..63d12466 100644 --- a/.github/workflows/publish-to-chrome.yml +++ b/.github/workflows/publish-to-chrome.yml @@ -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 "mannifest.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 \ No newline at end of file + zip: scrum-helper.zip + publish: true \ No newline at end of file diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 54aeb917..13059ee6 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -32,6 +32,48 @@ jobs: env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Debug release-drafter outputs + run: | + echo "release-drafter.tag_name='${{ steps.release_drafter.outputs.tag_name }}" + echo "release-drafter.body:"" + echo "${{ steps.release_drafter.outputs.body }}" + + - name: Create / prepend CHANGELOG entry + if: steps.release_drafter.outputs.tag_name != '' + run: | + TAG="${{ steps.release_drafter.outputs.tag_name }}" + BODY="${{ steps.release_drafter.outputs.body }}" + DATE="$(date +%F)" + 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 >> /tmp/new_changelog.md + fi + mv /tmp/new_changelog.md CHANGELOG.md + git status --porcelain + + - name: Commit CHANGELOG, create & push tag + if: steps.release_drafter.outputs.tag_name != '' + env: + TAG: ${{ steps.release_drafter.outputs.tag_name }} + GIT_AUTHOR_NAME: "github-actions[bot]" + GIT_AUTHOR_EMAIL: "github-actions[bot]@users.noreply.github.com" + run: | + git config user.name "$GIT_AUTHOR_NAME" + git config user.email "$GIT_AUTHOR_EMAIL" + 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}" + git push origin HEAD:master + fi + if git rev-parse "$TAG" >/dev/null 2>&1; then + echo "Tag ${TAG} already exists locally" + else + git tag -a "${TAG}" -m "Release ${TAG}" + fi + git push origin "refs/tags/${TAG}" || echo "Tag push failed or tag already exists remotely" + - name: Checkout code uses: actions/checkout@v4 with: From c4c3290478cd352e6167ee4524135b191bf96ac7 Mon Sep 17 00:00:00 2001 From: Vedansh Saini <77830698+vedansh-5@users.noreply.github.com> Date: Mon, 8 Sep 2025 15:29:26 +0530 Subject: [PATCH 3/7] Update .github/workflows/publish-to-chrome.yml Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- .github/workflows/publish-to-chrome.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-to-chrome.yml b/.github/workflows/publish-to-chrome.yml index 63d12466..cbadf266 100644 --- a/.github/workflows/publish-to-chrome.yml +++ b/.github/workflows/publish-to-chrome.yml @@ -25,7 +25,7 @@ jobs: echo "Created zip:" unzip -l ../scrum-helper.zip if unzip -l ../scrum-helper.zip | awk '{print $4}' | grep -q '^manifest.json$'; then - echo "mannifest.json is at zip root" + 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 From 26db9c8df765b75b305b387491ba568220c8e4af Mon Sep 17 00:00:00 2001 From: Vedansh Saini <77830698+vedansh-5@users.noreply.github.com> Date: Mon, 8 Sep 2025 15:33:41 +0530 Subject: [PATCH 4/7] typo Signed-off-by: Vedansh Saini <77830698+vedansh-5@users.noreply.github.com> --- .github/workflows/release-drafter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 13059ee6..00b31cd0 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -35,7 +35,7 @@ jobs: - name: Debug release-drafter outputs run: | echo "release-drafter.tag_name='${{ steps.release_drafter.outputs.tag_name }}" - echo "release-drafter.body:"" + echo "release-drafter.body:" echo "${{ steps.release_drafter.outputs.body }}" - name: Create / prepend CHANGELOG entry From 7e54ba0ee56cf223d8763c540405699f1c7ab310 Mon Sep 17 00:00:00 2001 From: Vedansh Saini <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 15:48:05 +0530 Subject: [PATCH 5/7] workflow Signed-off-by: Vedansh Saini <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/release-drafter.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 00b31cd0..1f3358cb 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -51,28 +51,33 @@ jobs: mv /tmp/new_changelog.md CHANGELOG.md git status --porcelain - - name: Commit CHANGELOG, create & push tag + - name: Commit CHANGELOG, create & push tag (explicit) if: steps.release_drafter.outputs.tag_name != '' env: TAG: ${{ steps.release_drafter.outputs.tag_name }} - GIT_AUTHOR_NAME: "github-actions[bot]" - GIT_AUTHOR_EMAIL: "github-actions[bot]@users.noreply.github.com" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - git config user.name "$GIT_AUTHOR_NAME" - git config user.email "$GIT_AUTHOR_EMAIL" + 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}" - git push origin HEAD:master fi - if git rev-parse "$TAG" >/dev/null 2>&1; then + + REPO="${{ github.repository }}" + echo "Pushing commit to origin..." + git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${REPO}.git" HEAD:master || echo "Push failed" + + if git rev-parse "${TAG}" >/dev/null 2>&1; then echo "Tag ${TAG} already exists locally" else - git tag -a "${TAG}" -m "Release ${TAG}" + git tag -a "${TAG}" -m "Release ${TAG}" || true fi - git push origin "refs/tags/${TAG}" || echo "Tag push failed or tag already exists remotely" + git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${REPO}.git" "refs/tags/${TAG}" || echo "Tag push failed or tag exists" - name: Checkout code uses: actions/checkout@v4 From b924b93b7973a93811227339e5267c354ee41806 Mon Sep 17 00:00:00 2001 From: Vedansh Saini <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:00:06 +0530 Subject: [PATCH 6/7] workflow Signed-off-by: Vedansh Saini <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/release-drafter.yml | 80 ++++++++++----------------- 1 file changed, 28 insertions(+), 52 deletions(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 1f3358cb..5ea3bc6a 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -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] @@ -15,14 +13,15 @@ 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 @@ -30,33 +29,40 @@ jobs: config-name: release-drafter.yml publish: false env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - - name: Debug release-drafter outputs + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Debug release-drafter outputs (safe) run: | - echo "release-drafter.tag_name='${{ steps.release_drafter.outputs.tag_name }}" - echo "release-drafter.body:" - echo "${{ steps.release_drafter.outputs.body }}" + 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: Create / prepend CHANGELOG entry if: steps.release_drafter.outputs.tag_name != '' run: | TAG="${{ steps.release_drafter.outputs.tag_name }}" - BODY="${{ steps.release_drafter.outputs.body }}" + 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 >> /tmp/new_changelog.md fi mv /tmp/new_changelog.md CHANGELOG.md - git status --porcelain + git status --porcelain || true - - name: Commit CHANGELOG, create & push tag (explicit) + - 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" @@ -69,9 +75,11 @@ jobs: fi REPO="${{ github.repository }}" - echo "Pushing commit to origin..." - git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${REPO}.git" HEAD:master || echo "Push failed" + # 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 @@ -79,44 +87,12 @@ jobs: fi git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${REPO}.git" "refs/tags/${TAG}" || echo "Tag push failed or tag exists" - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Ensure correct branch is checked out (only on PR) - if: github.event_name == 'pull_request' - 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: + with: node-version: '20' - - name: Update Changelog + - name: (Optional) Update Changelog formatting / run scripts 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 }} - - - \ No newline at end of file + # placeholder for any project-specific changelog formatting commands + echo "Changelog updated; no additional formatting configured" \ No newline at end of file From bf8bf88cfae0b3d8c8ecf70f00ee6ca3700c32f3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 10:30:24 +0000 Subject: [PATCH 7/7] docs(changelog): update for v0.1.2 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 270d349a..81df6976 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v0.1.2 - 2025-09-08 + +## What's Changed + +* No changes + +--- + ## v0.1.2 (2025-09-08) ## What's Changed