diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml index 610bbf9..522cd38 100644 --- a/.github/workflows/create-release.yaml +++ b/.github/workflows/create-release.yaml @@ -40,8 +40,8 @@ jobs: env: VERSION: ${{ steps.version.outputs.version }} run: | - # Extract changelog section for this version - awk "/^## \[$VERSION\]/,/^## \[/" CHANGELOG.md | sed '$d' | tail -n +2 > changelog.txt + # Extract changelog section for this version (from version header to next version header or EOF) + awk "/^## \[$VERSION\]/{flag=1; next} /^## \[/{flag=0} flag" CHANGELOG.md > changelog.txt echo "### Release Notes for $VERSION" >> "$GITHUB_STEP_SUMMARY" echo "" >> "$GITHUB_STEP_SUMMARY" @@ -56,7 +56,8 @@ jobs: run: | gh release create "$TAG" \ --title "Release $VERSION" \ - --notes-file changelog.txt + --notes-file changelog.txt \ + --target "${{ github.sha }}" echo "" >> "$GITHUB_STEP_SUMMARY" echo "✅ Created release $TAG" >> "$GITHUB_STEP_SUMMARY" diff --git a/.github/workflows/sync-dev-to-main.yaml b/.github/workflows/sync-dev-to-main.yaml new file mode 100644 index 0000000..0b93b7b --- /dev/null +++ b/.github/workflows/sync-dev-to-main.yaml @@ -0,0 +1,35 @@ +name: Sync dev to main + +on: + push: + branches: + - main + +jobs: + sync: + name: Fast-forward dev to main + runs-on: ubuntu-latest + if: contains(github.event.head_commit.message, 'Merge pull request') && contains(github.event.head_commit.message, 'from fragforce/dev') + permissions: + contents: write + steps: + - name: Generate app token + id: app-token + uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3 + with: + client-id: ${{ secrets.FRAGFORCE_AUTOMATION_APP_ID }} + private-key: ${{ secrets.FRAGFORCE_AUTOMATION_PRIVATE_KEY }} + + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + fetch-depth: 0 + token: ${{ steps.app-token.outputs.token }} + + - name: Fast-forward dev to main + run: | + git config user.name "fragforce-automation[bot]" + git config user.email "fragforce-automation[bot]@users.noreply.github.com" + git checkout -B dev origin/dev + git merge --ff-only origin/main + git push origin dev diff --git a/CHANGELOG.md b/CHANGELOG.md index 973f853..9beb473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to Fragforce Reads will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.1] - 2026-07-01 + +### Fixed +- Release workflow now correctly extracts changelog content for single/first version entries +- Release workflow now tags the correct commit (main merge commit) instead of dev branch head +- Dev branch now automatically syncs after main merges to prevent divergence + ## [1.0.0] - 2026-07-01 Initial MVP release of Fragforce Reads - an audio playback service for the VTO Book Reading project. @@ -101,4 +108,5 @@ Initial MVP release of Fragforce Reads - an audio playback service for the VTO B - HTML accessibility and CSS deprecation warnings - Cognitive complexity in views (SonarCloud) +[1.0.1]: https://github.com/fragforce/read/releases/tag/v1.0.1 [1.0.0]: https://github.com/fragforce/read/releases/tag/v1.0.0 diff --git a/pyproject.toml b/pyproject.toml index a835ba9..0fea020 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "fragforce-read" -version = "1.0.0" +version = "1.0.1" description = "Audio playback service for the VTO Book Reading project" requires-python = ">=3.13" dependencies = [