Skip to content

DRAFT: Release workflows #49

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 44 commits into from
Jan 13, 2022
Merged

DRAFT: Release workflows #49

merged 44 commits into from
Jan 13, 2022

Conversation

jankapunkt
Copy link
Member

This PR implements a multi-stage testing and release workflow, as proposed on #36

The proposed workflow logic is therefore the following:

A. PR to development and master + pushing to them:

  • run basic unit tests (tests.yml)
  • do not run this basic tests on release-* branches, since they have their own extended workflow

B. PR / Push to a release-* branch:

  • run npm audit
  • run basic unit tests
  • run extended integration tests against all adapter packages
  • run publish dry-run for npm registry
  • run publish dry-run for github packages registry

C. Create a (new release)[https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository]

  • execute B
  • finally publish to NPM
  • finally publish to GH

The workflows A and B are triggered fully automated, while C still needs a release to be created by one of the maintainers. This is because a pull request to a release-* does not necessarily mean to create a new release from the package.

On the other hand - this could also be changed to, say, automatically create a new release at the end of workflow B when all checks have passed

@jankapunkt jankapunkt self-assigned this Oct 18, 2021
@jankapunkt jankapunkt added security ❗ Address a security issue enhancement ✨ New feature or request labels Oct 18, 2021
@jankapunkt jankapunkt linked an issue Oct 18, 2021 that may be closed by this pull request
@jwerre
Copy link
Contributor

jwerre commented Oct 18, 2021

This looks great @jankapunkt. I do like the idea of automatically publishing at the end of workflow B.

@HappyZombies
Copy link
Member

Fantastic, so to be clear, creating a release basically means making a tag IN github, correct?

@HappyZombies
Copy link
Member

HappyZombies commented Oct 19, 2021

Also, when/what do we merge to 'master', the release-* branch or after we tag it/release it in GitHub we merge it master?

@jankapunkt
Copy link
Member Author

@HappyZombies in it's current state it would mean to create a GitHub release (which also includes a Tag, yes)

Merging into master should be always the latest stable release, which is what many other projects do as well.

@HappyZombies
Copy link
Member

Got it,

@jankapunkt this looks great, thanks a lot for doing it. Once this PR is merged I think we are good to move forward, setup the npm keys and what not, and do a release for 4.1.0. What do you think?

@jankapunkt
Copy link
Member Author

Yes, exactly. However, I am not finished yet, since we need to manually test the new workflows. The good thing is, that the test-release workflow contains the exact same procedure as the release workfow, except that the publishing is a dry-run. I will create a release-test branch for testing this.

@HappyZombies
Copy link
Member

@jankapunkt i am going to go ahead and follow this pattern but do it manually, and release what we currently have in development. I'd just like to release something right now with a lot of updates and what not so we can update our personal modules already. Unless there's something they needs to be tested/ran instantly?

@jwerre
Copy link
Contributor

jwerre commented Oct 21, 2021

@jankapunkt, @HappyZombies I'm curious how the tags are being created for each version. I don't see it in the workflow, are we doing this locally when pushing to master? Something like:

  1. Run test locally: npm test
  2. Add and commit: git add . -A && git commit -m '...'
  3. Update version: npm version patch
  4. Deploy: git push origin master --tags

This is the way I tend to do it but I'm not super familiar with GitHub Actions. It would be nice if there was a way to automate these steps (I'd be happy to create a shell script to this effect).

Also, I feel like we touched on this somewhere but what are the plans for all the branches we create. I feel we could safely delete old branches since there is not point to having both tags and branches—keep things tidy.

@HappyZombies
Copy link
Member

@jwerre When creating a tag we will have to use the "GitHub release" component that will create our tags for us. This will then run the GitHub action and publish to npm.

Basically, it'll be development-> release -> master. Then make a GitHub release, which will create a tag

As for the deletion of branches, I'm for it 100%

@HappyZombies
Copy link
Member

I will be releasing 4.1.0 manually this week until we have this release strategy straightened out.

@jankapunkt jankapunkt changed the base branch from development to release-test October 30, 2021 07:51
@jankapunkt jankapunkt marked this pull request as ready for review October 30, 2021 07:53
@jankapunkt
Copy link
Member Author

@HappyZombies @jwerre I changed the base branch to release-tests the idea is the following:

we can't test the new actions just by opening a PR (because if that would be possible, someone could just open a PR, start any actions on the CI and maybe steal credentials or anything else).

In turn we need to pull this into the release-test branch and once pulled (after review) we can test the new included test-release-yml action, which also includes a npm publish and github publish dry run.

Once this is working we can pull it into development and have our release system ready for any new release :-)

@jankapunkt
Copy link
Member Author

@jwerre @HappyZombies just a short ping - can you please read the above comments and let me know if you understand the intended steps? If you confirm, I'll merge into release-tests and immediately create a PR into development with additional release-check tests (but without an actual release, as this will be done manually using a GH release)

Copy link
Contributor

@jwerre jwerre left a comment

Choose a reason for hiding this comment

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

Wonderful!

up semver and update changelog for dev branch
orgads and others added 24 commits November 24, 2021 22:15
…om FStefanni/issue_89_20_649

Supported state in case of denial
Merge pull request #93 from node-oauth/fix-vcharfail-allowemptystate
Co-authored-by: Daniel Reguero <daniel.reguero@hotmail.com>
Co-authored-by: Francesco Stefanni <francesco.stefanni@gizeroenergie.it>
Bumps [eslint](https://github.com/eslint/eslint) from 8.2.0 to 8.4.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.2.0...v8.4.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: Daniel Reguero <daniel.reguero@hotmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ats #55

Merge pull request #108 from node-oauth/oauth-formats thanks to @jwerre
Bumps [sinon](https://github.com/sinonjs/sinon) from 11.1.2 to 12.0.1.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/master/docs/changelog.md)
- [Commits](sinonjs/sinon@v11.1.2...v12.0.1)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint](https://github.com/eslint/eslint) from 8.2.0 to 8.4.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.2.0...v8.4.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* test example

* created db & model factories

* added refresh_token grant type test

* removed failing test, not implemented feature

* add reference to issue

* client authentication test

* random client credentials in test

* replace math.random by crypto.randomBytes
…ri via model #89 p.4

- support custom validateRedirectUri()
- allow to implement model.validateRedirectUri
- updated AuthorizeHandler
- default conforms with RFC 6819 Section-5.2.3.5
- thanks to @FStefanni and @jorenvandeweyer
@jankapunkt jankapunkt linked an issue Jan 13, 2022 that may be closed by this pull request
@jankapunkt jankapunkt merged commit 91559ed into release-test Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request security ❗ Address a security issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't run CI on draft pull requests for releases Release strategy
6 participants