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
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@

name: Build
on:
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests)
# Trigger the workflow on pushes to only the 'main' and 'release' branches (this avoids duplicate checks being run
# e.g. for dependabot pull requests). The push to 'release' creates the release draft
push:
branches: [main]
branches: [main, release]
# Trigger the workflow on any pull request, except the ones to 'release': their head is main, whose push build
# already runs for the same commit and shows up in the pull request
pull_request:
Expand Down Expand Up @@ -229,9 +230,10 @@ jobs:

# Prepare a draft release for GitHub Releases page for the manual verification
# If accepted and published, release workflow would be triggered
# Only for 'release': a draft created from main could be published before the code is merged into 'release'
releaseDraft:
name: Release Draft
if: github.event_name != 'pull_request'
if: github.event_name == 'push' && github.ref == 'refs/heads/release'
needs: build
runs-on: ubuntu-latest
permissions:
Expand All @@ -257,7 +259,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ needs.build.outputs.version }} \
--target release \
--target ${{ github.sha }} \
--draft \
--title "v${{ needs.build.outputs.version }}" \
--notes "$(cat << 'EOM'
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# InlineProblems Changelog

## [Unreleased]
### Changed
- The GitHub release draft is created when a release is merged into the release branch, no longer on every push to main, so it cannot be published before the code is on the release branch

## [0.6.1] - 2026-10-13

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,13 @@ so everything goes through pull requests.
under `## [0.6.2]` and opens the pull request "Prepare the 0.6.2 release" to `main`. The
workflow stops if `[Unreleased]` is empty. No checks run on this pull request, it is created
with the `GITHUB_TOKEN`
3. **Merge into `main`** - the Build workflow on `main` creates the release draft `v0.6.2` with the
notes of the `[0.6.2]` section. Every push to `main` replaces the draft
3. **Merge into `main`**
4. **Beta** - open the pull request `main -> release`, titled "main -> release for 0.6.2" with the
changelog entry as description. The Beta Release workflow publishes `0.6.2-beta+RC<run>.<attempt>` to the
Marketplace `beta` channel and creates the GitHub prerelease `v0.6.2-beta` with the changelog.
Every new commit on the pull request publishes a new beta
5. **Merge into `release`** - once the beta is fine. This has to happen before the next step: the
release draft targets `release`, and the tag is created there when the draft is published
5. **Merge into `release`** - once the beta is fine. The Build workflow on `release` creates the
release draft `v0.6.2` with the notes of the `[0.6.2]` section, targeting the merged commit
6. **Release** - publish the release draft `v0.6.2` on GitHub. The Release workflow publishes the
plugin to the Marketplace `default` and `beta` channels and attaches the ZIP to the release

Expand Down
Loading