diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 07a2de0d3..65c5671d8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,6 +8,33 @@ permissions: contents: write jobs: + prepare: + name: Prepare draft release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 + + - name: Parse release branch + if: startsWith(github.ref, 'refs/heads/release/') + run: | + # Extract the branch name (e.g. release/v1.2.3[-meta]) + ref=${GITHUB_REF#refs/heads/} + echo "RELEASE_BRANCH=$ref" >> $GITHUB_ENV + # Also export a RELEASE_TAG by removing the `release/` prefix (keeps leading 'v') + tag=${ref#release/} + echo "RELEASE_TAG=$tag" >> $GITHUB_ENV + shell: bash + + - name: Create draft release + uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 + with: + name: "${{ env.RELEASE_TAG }}" + tag_name: "${{ env.RELEASE_TAG }}" + draft: true + body: '# Gitify ${{ env.RELEASE_TAG }}' + generate_release_notes: true + release: name: Publish ${{ matrix.platform }} (electron-builder) strategy: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b65a74578..23feb18ea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,20 +58,27 @@ pnpm test -u The release process is automated. Follow the steps below. -1. Verify that all features you want targeted in the release have been merged to `main`. -2. Check the [Renovate Dependency Dashboard][github-dependency-dashboard] to see if there are any updates you want included. -3. Create a [new **draft** release][github-new-release]. Set the tag version to something with the format of `v1.2.3`. Save as a **draft** before moving to the next step -4. Create a branch that starts with `release/vX.X.X` (ie. `release/v1.2.3`). In this branch you need to: - * Run `pnpm version ` to **bump the version** in `package.json` and create a version commit/tag. + - Update `sonar.projectVersion` within `sonar-project.properties` + - Commit and push these changes. + - Open a Pull Request (PR) from your release branch. +4. **GitHub release:** GitHub Actions will automatically build, sign, and upload release assets to a new draft release with automated release notes. +5. **Merge the release branch:** Once the PR is approved and checks pass, merge your release branch into `main`. +6. **Publish the release:** + - Finalize the release notes in the draft release on GitHub. + - Confirm all assets are present and correct. + - Publish the release. +7. **Update milestones:** + - Edit the current [Milestone][github-milestones]: + - Add a link to the release notes in the description. + - Set the due date to the release date. + - Close the milestone. + - Create a [New Milestone][github-new-milestone] for the next release cycle. +8. A new homebrew cask will be [automatically published][homebrew-cask-autobump-workflow] (workflow runs ~3 hours) ### Design Guidelines