-
Notifications
You must be signed in to change notification settings - Fork 5.9k
feat: add release workflow #5560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✨ code-server docs for PR #5560 is ready! It will be updated on every commit.
|
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5560 +/- ##
=======================================
Coverage 72.44% 72.44%
=======================================
Files 30 30
Lines 1673 1673
Branches 366 366
=======================================
Hits 1212 1212
Misses 398 398
Partials 63 63 Continue to review full report at Codecov.
|
- uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
discussion_category_name: "📣 Announcements" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to test this since I don't have Discussions on my fork (not sure if possible). I don't think this should cause any issue though 🤞🏼
name: Draft release | ||
|
||
on: | ||
workflow_dispatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided for the first version of this to not add on new tags but we can add that in next version. Happy to be convinced to add it here though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me!
.github/workflows/release.yaml
Outdated
draft: true | ||
discussion_category_name: "📣 Announcements" | ||
files: ./release-packages/* | ||
body_path: ci/build/release-notes.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably remove body_path
since we will just overwrite this when copying from the changelog right? I wonder if we can somehow get fancy and automatically extract the last block from the changelog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's true. I'll delete release-notes.txt
too since it's already in the changelog.
I wonder if we can somehow get fancy and automatically extract the last block from the changelog.
Haha that would be awesome! Probably some script step before this one that parses CHANGELOG
-> grabs relevant block -> outputs to file -> we use that.
1. Summarize the major changes in the `CHANGELOG.md` | ||
1. Download CI artifacts and make sure code-server works locally. | ||
1. Merge PR and wait for CI build on `main` to finish. | ||
1. Go to GitHub Actions > Draft release > Run workflow off `main`. CI will automatically upload the artifacts to the release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So much better already!
.github/workflows/release.yaml
Outdated
uses: dawidd6/action-download-artifact@v2 | ||
id: download | ||
with: | ||
branch: main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually do we need the branch? We could just use whatever artifacts are on the branch we set the workflow to target when dispatching it I think? Normally we would set it to main
but this would let us release off different branches too if for some reason we needed to do that (like if we needed to backport a fix).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess not! That's a good point so I guess I'll change this to ${{ github.ref }}
Description
This PR is Part 1 / ? of the release workflow refactor. This adds a new workflow called
release.yaml
which creates a draft GitHub release and uploads artifacts frommain
. It assumes you've bumped the version in thepackage.json
already.Changes
Testing Plan
I tested this on my fork and was able to use it successfully.
Run: https://github.com/jsjoeio/code-server/actions/runs/3064111088
Related to #2817