Skip to content

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

Merged
merged 7 commits into from
Sep 16, 2022
Merged

feat: add release workflow #5560

merged 7 commits into from
Sep 16, 2022

Conversation

jsjoeio
Copy link
Contributor

@jsjoeio jsjoeio commented Sep 15, 2022

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 from main. It assumes you've bumped the version in the package.json already.

Changes

  • feat(ci): add draft release workflow
  • refactor: delete old release-github workflows
  • fixup! refactor: delete old release-github workflows

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

image

Related to #2817

@github-actions
Copy link

github-actions bot commented Sep 15, 2022

✨ code-server docs for PR #5560 is ready! It will be updated on every commit.

@jsjoeio jsjoeio changed the title jsjoeio/add release workflow feat: refactor release workflow Sep 15, 2022
@jsjoeio jsjoeio self-assigned this Sep 15, 2022
@jsjoeio jsjoeio added the ci Issues related to ci label Sep 15, 2022
@jsjoeio jsjoeio added this to the September 2022 milestone Sep 15, 2022
@jsjoeio jsjoeio temporarily deployed to npm September 15, 2022 23:03 Inactive
@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Merging #5560 (18d02d6) into main (7ecfb95) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ecfb95...18d02d6. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Sep 15, 2022

✨ code-server dev build published to npm for PR #5560!

  • Last publish status: success
  • Commit: 18d02d6

To install in a local project, run:

npm install @coder/code-server-pr@5560

To install globally, run:

npm install -g @coder/code-server-pr@5560

- uses: softprops/action-gh-release@v1
with:
draft: true
discussion_category_name: "📣 Announcements"
Copy link
Contributor Author

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:
Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

@jsjoeio jsjoeio changed the title feat: refactor release workflow feat: add release workflow Sep 15, 2022
@jsjoeio jsjoeio marked this pull request as ready for review September 15, 2022 23:04
@jsjoeio jsjoeio requested a review from a team as a code owner September 15, 2022 23:04
@jsjoeio jsjoeio temporarily deployed to npm September 15, 2022 23:09 Inactive
draft: true
discussion_category_name: "📣 Announcements"
files: ./release-packages/*
body_path: ci/build/release-notes.txt
Copy link
Member

@code-asher code-asher Sep 15, 2022

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.

Copy link
Contributor Author

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much better already!

uses: dawidd6/action-download-artifact@v2
id: download
with:
branch: main
Copy link
Member

@code-asher code-asher Sep 15, 2022

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).

Copy link
Contributor Author

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 }}

@jsjoeio jsjoeio enabled auto-merge (squash) September 16, 2022 14:52
@jsjoeio jsjoeio temporarily deployed to npm September 16, 2022 14:57 Inactive
@jsjoeio jsjoeio merged commit 987c68a into main Sep 16, 2022
@jsjoeio jsjoeio deleted the jsjoeio/add-release-workflow branch September 16, 2022 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Issues related to ci
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants