Skip to content
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

Create github workflow to publish release candidate #2399

Merged
merged 2 commits into from
Apr 30, 2021

Conversation

renansoares
Copy link
Contributor

@renansoares renansoares commented Apr 29, 2021

Github workflow to publish release candidate created based on the instructions in the CONTRIBUTING.md.

I added the need to check the pattern 0.0.0-rc0 in the branches' name. Not sure if we need it.

Closes #2342

@renansoares
Copy link
Contributor Author

@dac09 🚀

@dac09
Copy link
Collaborator

dac09 commented Apr 29, 2021

Thank you so much for this @renansoares! I'll take a look tomorrow :)

@github-actions
Copy link

github-actions bot commented Apr 29, 2021

📦 PR Packages

Click to Show Package Download Links

https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/create-redwood-app-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-api-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-api-server-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-auth-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-cli-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-core-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-dev-server-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-eslint-config-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-eslint-plugin-redwood-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-forms-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-internal-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-prerender-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-router-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-structure-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-testing-0.31.0-2b02490.tgz
https://rw-pr-redwoodjs-com.s3.amazonaws.com/2399/redwoodjs-web-0.31.0-2b02490.tgz

Install this PR by running yarn rw upgrade --pr 2399:0.31.0-2b02490


on:
push:
branches: ['releases/[0-9]+.[0-9]+.[0-9]+-rc[0-9]+']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps we could just do release/* (also should probably be release, not releases)

See other comments below

Comment on lines 24 to 30
- name: Extract version from branch
shell: bash
run: echo "##[set-output name=version;]$(echo ${GITHUB_REF##*/})"
id: extract_version

- name: Create package version
run: ./tasks/update-package-versions ${{ steps.extract_version.outputs.version }}
Copy link
Collaborator

@dac09 dac09 Apr 30, 2021

Choose a reason for hiding this comment

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

Can we skip these steps if use

yarn lerna publish --canary --preid rc --dist-tag rc --yes

?


- name: Publish package
run:
yarn lerna publish from-package --yes
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not an expert on publishing from lerna but how about

yarn lerna publish --canary --preid rc --dist-tag rc --yes

And we don't have to worry about bumping versions based on the branch name. What do you think?

Comment on lines 37 to 40
run: |
git commit -am "${{ steps.extract_version.outputs.version }}"
git tag ${{ steps.extract_version.outputs.version }}
git push && git push --tags
Copy link
Collaborator

Choose a reason for hiding this comment

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

🤯 that you can do this, like this.

Not sure about pushing tags though, because in reality what we're probably going to have is a workflow like this:

  1. Create release branch release/v0.32
  2. Add commits to this branch, to fix any issues / improvements for the release
  3. On each commit, it should publish 0.32.0-rc.0+${SHA}

Not sure if theres any use for each tag being present for this on the main repo

Copy link
Contributor Author

@renansoares renansoares Apr 30, 2021

Choose a reason for hiding this comment

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

oh ok. I misunderstood. I thought that it would follow the same process of publishing a release described on the CONTRIBUTING.md, will make the changes. it's clear now, thanks.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it should probably be more similar to the task in .github/workflows/publish-npm-canary.yaml

@renansoares renansoares force-pushed the add-rc-workflow branch 2 times, most recently from 64e273a to da3cf60 Compare April 30, 2021 12:37
@renansoares renansoares marked this pull request as draft April 30, 2021 13:49
@dac09
Copy link
Collaborator

dac09 commented Apr 30, 2021

@thedavidprice eyes on this please?

If you're happy shall we take this for a spin?

@thedavidprice
Copy link
Contributor

@renansoares so greatly appreciate all your recent help across so many things. Thank you 🚀

I agree it's at a place where we need to try it out. And this process definitely needs to be documented in Contributing (along with adding info about canaries and the branch/patch release process in general).

@thedavidprice thedavidprice marked this pull request as ready for review April 30, 2021 20:06
@thedavidprice thedavidprice merged commit ccde222 into redwoodjs:main Apr 30, 2021
@thedavidprice thedavidprice added this to the next-release milestone Apr 30, 2021
thedavidprice added a commit that referenced this pull request Apr 30, 2021
Co-authored-by: David Price <thedavid@thedavidprice.com>
@thedavidprice
Copy link
Contributor

working!

Screen Shot 2021-04-30 at 3 52 13 PM

thedavidprice added a commit that referenced this pull request May 1, 2021
* testing cli danny

* updated

* dp ftw

* now it's dsp

* Create github workflow to publish release candidate (#2399)

Co-authored-by: David Price <thedavid@thedavidprice.com>

* update github workflow files (#2419)

Co-authored-by: Renan Andrade <renansoareess@gmail.com>
dac09 added a commit that referenced this pull request May 4, 2021
* feat(webhooks): Handle base64 encoded webhook payloads (#2340)

* Handle base64 encoded payloads

* Removes console logging.

* Updates to Redwood-Render integration (#2336)

* updating build and start abstractions

* add boxen and improve setup deploy message

* improve render.yaml format

* removing region from static site

* Handle focus on route change (#2321)

* feat: focus RouteFocus on route change

* feat: handle elements that aren't focusable

* feat: add some tests for getFocus

* style: split up tests

* Fix "yarn rw test web" in e2e tests (#2329)

* Copy rwjs packages to different location.

* Run web tests.

* Serve web/dist with `yarn rw serve web`  (#2234)

* Fix race condition in rwt link

* Add new run command for api server

* Update description for command

* Rename run -> serve | Actually proxy the handler

* Update packages/cli/src/commands/serve.js

Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>

* PR Suggestions

* Fix link

* feat(rw-serv): Now supports serving web and both web+api

* Regenerate yarn.lock from root

* Refactor api-server file structure | Tests WIP

* Update tests

* Update packages/api-server/src/handler.ts

Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>

* Read index content once, to prevent accessing FS every time

Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>

* Verify signatures for secure webhooks and functions (#1843)

* secureHandler verifies webhook signatures

* Do not run verify as cannot acces env

* Tests verify event. PR review updates.

* WebhookVerificationError message is a string

* Fixes Expected { after 'if' condition  curly

* Refactor secureHandler for a verifier

* Get to green on ecureHandler.test

* WIP verifier refactoring

* Refactor into verifiers with types

* Tests and implement verifyWebhook

* Refactors signature header into options

* Adds tests for none, secretKey, sha256

* Correct jsdocs

* Adds ability to override event body payload

* Refactor to use receiveAndVerify. Add tests. Support object payload for sha.

* Add JWT verifier/Renames *Verifier & None to Skip

* jwtVerifier wip

* WIP

* Add webhooks to api

* Reorganize and add sha1 verifier

* Adds more webhooks tests per verifier

* Refactor createVerifier

* Uses jwt.verify to check the issuer

* Refactor circular dependency w separate types file

* redwoodjs/api needs webhooks

* Made VerifyOptions optional

* Refactor WebhookVerifier interface w/ Danny

* Cleanup jsdocs

* Explains WEBHOOK_SECRET

* Fix page generator taking in ts | Fix rw serve crashing out cli (#2335)

* Fix page generator taking in ts | Fix rw serve crashing out cli

* Change e2e to pass --typescript param

* Remove unneeded comments

* edit serve command

* restoring serve command

* fixing serve conditional logic

Co-authored-by: Dominic Saadi <32992335+jtoar@users.noreply.github.com>
Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>
Co-authored-by: Daniel Choudhury <dannychoudhury@gmail.com>
Co-authored-by: David Thyresson <dthyresson@gmail.com>

* Fix paths so e2e tests link local framework correctly (#2345)

* Adds process and require to eslint config web (#2354)

* v0.31.0

* prepare branch for patch release v0.31.1 (#2420)

* testing cli danny

* updated

* dp ftw

* now it's dsp

* Create github workflow to publish release candidate (#2399)

Co-authored-by: David Price <thedavid@thedavidprice.com>

* update github workflow files (#2419)

Co-authored-by: Renan Andrade <renansoareess@gmail.com>

* fix(generator): Page generators accept default options too (#2413)

* fix(generator): Page generators accept default options too

* Page generator also takes path positional

* Fix command string with positionals

* Remove DP testing branch deployment ;)

* Empty commit to bump RC version

* v0.31.1

* v0.31.2

* Add githead.

Co-authored-by: David Thyresson <dthyresson@gmail.com>
Co-authored-by: Sean Doughty <sean@render.com>
Co-authored-by: Dominic Saadi <32992335+jtoar@users.noreply.github.com>
Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>
Co-authored-by: David Price <thedavid@thedavidprice.com>
Co-authored-by: Renan Andrade <renansoareess@gmail.com>
fveauvy pushed a commit to fveauvy/redwood that referenced this pull request May 15, 2021
* feat(webhooks): Handle base64 encoded webhook payloads (redwoodjs#2340)

* Handle base64 encoded payloads

* Removes console logging.

* Updates to Redwood-Render integration (redwoodjs#2336)

* updating build and start abstractions

* add boxen and improve setup deploy message

* improve render.yaml format

* removing region from static site

* Handle focus on route change (redwoodjs#2321)

* feat: focus RouteFocus on route change

* feat: handle elements that aren't focusable

* feat: add some tests for getFocus

* style: split up tests

* Fix "yarn rw test web" in e2e tests (redwoodjs#2329)

* Copy rwjs packages to different location.

* Run web tests.

* Serve web/dist with `yarn rw serve web`  (redwoodjs#2234)

* Fix race condition in rwt link

* Add new run command for api server

* Update description for command

* Rename run -> serve | Actually proxy the handler

* Update packages/cli/src/commands/serve.js

Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>

* PR Suggestions

* Fix link

* feat(rw-serv): Now supports serving web and both web+api

* Regenerate yarn.lock from root

* Refactor api-server file structure | Tests WIP

* Update tests

* Update packages/api-server/src/handler.ts

Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>

* Read index content once, to prevent accessing FS every time

Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>

* Verify signatures for secure webhooks and functions (redwoodjs#1843)

* secureHandler verifies webhook signatures

* Do not run verify as cannot acces env

* Tests verify event. PR review updates.

* WebhookVerificationError message is a string

* Fixes Expected { after 'if' condition  curly

* Refactor secureHandler for a verifier

* Get to green on ecureHandler.test

* WIP verifier refactoring

* Refactor into verifiers with types

* Tests and implement verifyWebhook

* Refactors signature header into options

* Adds tests for none, secretKey, sha256

* Correct jsdocs

* Adds ability to override event body payload

* Refactor to use receiveAndVerify. Add tests. Support object payload for sha.

* Add JWT verifier/Renames *Verifier & None to Skip

* jwtVerifier wip

* WIP

* Add webhooks to api

* Reorganize and add sha1 verifier

* Adds more webhooks tests per verifier

* Refactor createVerifier

* Uses jwt.verify to check the issuer

* Refactor circular dependency w separate types file

* redwoodjs/api needs webhooks

* Made VerifyOptions optional

* Refactor WebhookVerifier interface w/ Danny

* Cleanup jsdocs

* Explains WEBHOOK_SECRET

* Fix page generator taking in ts | Fix rw serve crashing out cli (redwoodjs#2335)

* Fix page generator taking in ts | Fix rw serve crashing out cli

* Change e2e to pass --typescript param

* Remove unneeded comments

* edit serve command

* restoring serve command

* fixing serve conditional logic

Co-authored-by: Dominic Saadi <32992335+jtoar@users.noreply.github.com>
Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>
Co-authored-by: Daniel Choudhury <dannychoudhury@gmail.com>
Co-authored-by: David Thyresson <dthyresson@gmail.com>

* Fix paths so e2e tests link local framework correctly (redwoodjs#2345)

* Adds process and require to eslint config web (redwoodjs#2354)

* v0.31.0

* prepare branch for patch release v0.31.1 (redwoodjs#2420)

* testing cli danny

* updated

* dp ftw

* now it's dsp

* Create github workflow to publish release candidate (redwoodjs#2399)

Co-authored-by: David Price <thedavid@thedavidprice.com>

* update github workflow files (redwoodjs#2419)

Co-authored-by: Renan Andrade <renansoareess@gmail.com>

* fix(generator): Page generators accept default options too (redwoodjs#2413)

* fix(generator): Page generators accept default options too

* Page generator also takes path positional

* Fix command string with positionals

* Remove DP testing branch deployment ;)

* Empty commit to bump RC version

* v0.31.1

* v0.31.2

* Add githead.

Co-authored-by: David Thyresson <dthyresson@gmail.com>
Co-authored-by: Sean Doughty <sean@render.com>
Co-authored-by: Dominic Saadi <32992335+jtoar@users.noreply.github.com>
Co-authored-by: Peter Pistorius <peter.pistorius@gmail.com>
Co-authored-by: David Price <thedavid@thedavidprice.com>
Co-authored-by: Renan Andrade <renansoareess@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC: [CI] Publish release candidate packages from release/* branches
3 participants