diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5434166..f8e313c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,41 @@ jobs: working-directory: dist run: zip -r ../webui.zip . - - name: Upload release asset + - name: Build release body + run: | + awk '/^## \[/{c++} c==1' CHANGELOG.md > release_body.md + + - name: Release uses: softprops/action-gh-release@v3 with: files: webui.zip + body_path: release_body.md + # Tag-push releases are created as drafts; the `publish` job un-drafts + # them only after the build succeeds, so watcher notifications don't + # fire on broken builds. + draft: true + + publish: + name: Publish release + needs: [build] + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Un-draft release + env: + GH_TOKEN: ${{ github.token }} + run: gh release edit "${{ github.ref_name }}" --draft=false --latest --repo "${{ github.repository }}" + + cleanup: + name: Cleanup failed release + needs: [build] + if: failure() + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Delete draft release and tag + env: + GH_TOKEN: ${{ github.token }} + run: gh release delete "${{ github.ref_name }}" --yes --cleanup-tag --repo "${{ github.repository }}" || true diff --git a/.gitignore b/.gitignore index 4d704be..66626f3 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,5 @@ dist-ssr scripts/ *.md !README.md +!CHANGELOG.md /SPEC-* diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0bb72d5 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +# Change Log + +All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). + +## [0.1.0] - 2026-04-20 + +### Added +- Initial release. + +### Changed + +### Fixed +