Skip to content

Commit

Permalink
Update release process, use .yaml extension for workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Oct 19, 2021
1 parent 6393de3 commit 8a355a2
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 83 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml → .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm i -g npm@7
- run: npm install
- run: npm test
- run: npm install-test

coverage:
runs-on: ubuntu-latest
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/release-github.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release GitHub

on:
push:
branches: [release/*]

jobs:
create-github-release:
name: Create GitHub Release and Git tag
runs-on: ubuntu-latest
environment: Release
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: cucumber/action-create-github-release@v1.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
File renamed without changes.
83 changes: 2 additions & 81 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Now type `npm run` or see the `package.json` scripts section for how to run each
* [chai](https://www.chaijs.com/)
* [sinon](https://sinonjs.org/)
* compatibility kit - `npm run cck-test`
* checking that cucumber-js emits the [correct messages](https://github.com/cucumber/cucumber/tree/master/compatibility-kit)
* checking that cucumber-js emits the [correct messages](https://github.com/cucumber/cucumber/tree/master/compatibility-kit)
* feature tests - `npm run feature-test`
* cucumber-js tests itself

Expand Down Expand Up @@ -65,84 +65,5 @@ The runtime emits events with an [EventEmitter](https://nodejs.org/api/events.ht
* The contributor should update the changelog
* Each entry in the changelog should include a link to the relevant issues/PRs

## Release process

_The following is a checklist for maintainers when preparing a new release_

### Major releases

We will always make a release candidate before issuing a major release. The release candidate will be available for at least a month to give users
time to validate that there are no unexpected breaking changes.

### Process

The release is done from the [cucumber-build](https://github.com/cucumber/cucumber-build/) docker container. This makes
sure we use the same environment for all releases.

**Every command should be run from within the Docker container**.

Start the container:

make docker-run

Inside the container, install the correct version of Node:

nvm install --lts

Then update the dependencies and test:

npm run update-dependencies
npm run
npm run test

If the tests fail, update your code to be compatible with the new libraries, or revert the library upgrades that break the build.

* Add missing entries to `CHANGELOG.md`
* Ideally the CHANGELOG should be up-to-date, but sometimes there will be accidental omissions when merging PRs. Missing PRs should be added.
* Describe the major changes introduced. API changes must be documented. In particular, backward-incompatible changes must be well explained, with examples when possible.
* `git log --format=format:"* %s (%an)" --reverse <last-version-tag>..HEAD` might be handy.
* Update the contributors list in `package.json`
* `git log --format=format:"%an <%ae>" --reverse <last-version-tag>..HEAD | grep -vEi "(renovate|dependabot|Snyk)" | sort| uniq -i`
* Manually add contributors (in alphabetical order)

[Decide what the next version should be](https://github.com/cucumber/cucumber/blob/master/RELEASE_PROCESS.md#decide-what-the-next-version-should-be).

Update CHANGELOG links:

NEW_VERSION=<major.minor.patch(-rc.X)> make update-changelog

Verify changes to the CHANGELOG are correct. Stage uncommitted changes:

git add .
git commit -am "Release <major.minor.patch(-rc.X)>"

Then bump the version number and create a git tag. Run *one* of the following:

# Major prelease
npm version premajor --preid=rc

# Major release
npm version major

# Minor release
npm version minor

# Patch release
npm version patch

Publish to npm:

npm publish --access public

Push to git:

git push
git push --tags

* Edit and publish the [release entry on GitHub](https://github.com/cucumber/cucumber-js/releases)
* Update [docs.cucumber.io](https://github.com/cucumber/docs.cucumber.io)
* Update the cucumber-js version `data/versions.yaml`
* Ensure the javascript examples are up to date

[Community Slack]: https://cucumber.io/community#slack
[raise an issue]: https://github.com/cucumber/cucumber-js/issues/new/choose
[raise an issue]: https://github.com/cucumber/cucumber-js/issues/new/choose
20 changes: 20 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Releasing

First, update as many dependencies as you can and test:

npm run update-dependencies
npm test

If the tests fail, update your code to be compatible with the new libraries, or
revert the library upgrades that break the build.

* Add missing entries to `CHANGELOG.md`
* Ideally the CHANGELOG should be up-to-date, but sometimes there will be accidental omissions when merging PRs. Missing PRs should be added.
* Describe the major changes introduced. API changes must be documented. In particular, backward-incompatible changes must be well explained, with examples when possible.
* `git log --format=format:"* %s (%an)" --reverse <last-version-tag>..HEAD` might be handy.
* Update the contributors list in `package.json`
* `git log --format=format:"%an <%ae>" --reverse <last-version-tag>..HEAD | grep -vEi "(renovate|dependabot|Snyk)" | sort| uniq -i`
* Manually add contributors (in alphabetical order)

Follow [cucumber/.github/RELEASING.md](https://github.com/cucumber/.github/blob/main/RELEASING.md)
for the rest of the release process.

0 comments on commit 8a355a2

Please sign in to comment.