Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: Create GitHub Release

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/actions-create-github-release@v1.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/release-go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release Go module

on:
push:
branches: [release/*]

jobs:
publish-go:
name: Create go/* tag
runs-on: ubuntu-latest
steps:
- uses: cucumber-actions/versions@1.1.0
id: versions
- name: Create go/* tag
run: |
git tag "go/${{ steps.versions.outputs.changelog-latest-version }}"
git push --tags
24 changes: 24 additions & 0 deletions .github/workflows/release-mvn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release Maven Package

on:
push:
branches: [release/*]

jobs:
publish-mvn:
name: Publish Maven Package
runs-on: ubuntu-latest
environment: Release
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '11'
cache: 'maven'
- uses: cucumber/action-publish-mvn@v1.0.0
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
nexus-username: cukebot
nexus-password: ${{ secrets.SONATYPE_PASSWORD }}
directory: java
22 changes: 22 additions & 0 deletions .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release NPM module

on:
push:
branches: [release/*]

jobs:
publish-npm:
name: Publish NPM module
runs-on: ubuntu-latest
environment: Release
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: javascript/ui/package-lock.json
- uses: cucumber/action-publish-npm@v1.0.0
with:
npm-token: ${{ secrets.NPM_TOKEN }}
working-directory: javascript
21 changes: 21 additions & 0 deletions .github/workflows/release-rubygem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish Ruby Gem

on:
push:
branches: [release/*]

jobs:
publish-rubygem:
name: Publish Ruby Gem
runs-on: ubuntu-latest
environment: Release
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.2
bundler-cache: true
- uses: cucumber/action-publish-rubygem@v1.0.0
with:
rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
working_directory: ruby
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: ./javascript/package-lock.json
- run: npm i -g npm@7
- name: npm install-test
- run: npm install-test
working-directory: ./javascript
run: npm install-test

File renamed without changes.
18 changes: 9 additions & 9 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ The AST is constructed from the following tokens:

```ebnf
escape = "\"
token = whitespace | "(" | ")" | "{" | "}" | "/" | .
. = any non-reserved codepoint
token = whitespace | "(" | ")" | "{" | "}" | "/" | .
. = any non-reserved codepoint
```

Note:
Expand All @@ -43,17 +43,17 @@ The AST can be rewritten into a regular expression by the following production
rules:

```
cucumber-expression -> '^' + rewrite(node[0]) + ... + rewrite(node[n-1]) + '$'
alternation -> '(?:' + rewrite(node[0]) + '|' + ... + '|' + rewerite(node[n-1]) + ')'
alternative -> rewrite(node[0]) + ... + rewrite(node[n-1])
optional -> '(?:' + rewrite(node[0]) + ... + rewrite(node[n-1]) + ')?'
cucumber-expression -> "^" + rewrite(node[0]) + ... + rewrite(node[n-1]) + "$"
alternation -> "(?:" + rewrite(node[0]) + "|" + ... + "|" + rewerite(node[n-1]) + ")"
alternative -> rewrite(node[0]) + ... + rewrite(node[n-1])
optional -> "(?:" + rewrite(node[0]) + ... + rewrite(node[n-1]) + ")?"
parameter -> {
parameter_name := node[0].text + ... + node[n-1].text
parameter_pattern := parameter_type_registry[parameter_name]
'((?:' + parameter_pattern[0] + ')|(?:' ... + ')|(?:' + parameter_pattern[n-1] + '))'
"((?:" + parameter_pattern[0] + ")|(?:" ... + ")|(?:" + parameter_pattern[n-1] + "))"
}
text -> {
escape_regex := escape '^', `$`, `[`, `]`, `(`, `)` `\`, `{`, `}`, `.`, `|`, `?`, `*`, `+`
escape_regex(token.text)
escape_regex := escape "^", "$", "[", "]", "(", ")" "\", "{", "}", ".", "|", "?", "*", "+"
escape_regex(token.text)
}
```
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributing

Everyone contributing to this repo is expected to abide by the [Cucumber Community Code of Conduct](https://cucumber.io/conduct).
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[![test-go](https://github.com/cucumber/cucumber-expressions/actions/workflows/test-go.yml/badge.svg)](https://github.com/cucumber/cucumber-expressions/actions/workflows/test-go.yml)
[![test-java](https://github.com/cucumber/cucumber-expressions/actions/workflows/test-java.yml/badge.svg)](https://github.com/cucumber/cucumber-expressions/actions/workflows/test-java.yml)
[![test-javascript](https://github.com/cucumber/cucumber-expressions/actions/workflows/test-javascript.yml/badge.svg)](https://github.com/cucumber/cucumber-expressions/actions/workflows/test-javascript.yml)
[![test-ruby](https://github.com/cucumber/cucumber-expressions/actions/workflows/test-ruby.yml/badge.svg)](https://github.com/cucumber/cucumber-expressions/actions/workflows/test-ruby.yml)

# Cucumber Expressions

Cucumber Expressions is an alternative to [Regular Expressions](https://en.wikipedia.org/wiki/Regular_expression)
Expand Down
47 changes: 47 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Releasing

There are two parts to making a release. First, prepare the release, then make the release.

## Preparing a release

Anyone with permission to push to the `main` branch can prepare a release.
To make these steps easier, you can use the [`changelog`](https://github.com/cucumber/changelog) tool.

1. Make sure the CI badges in `README.md` indicate passing
1. Decide what the next version number should be
* Look at `CHANGELOG.md` to see what has changed since the last relesase
* Use [semver](https://semver.org/) to pick a version for the next release.
```
read $next_release
```
1. Modify the changelog:
```
changelog release $next_release -o CHANGELOG.md
```
* If you don't have `changelog` installed, do it manually:
* Under `[Unreleased]` at the top, add a new `[${version}] - ${YYYY-mm-dd}` header
* Add a new `[${version}]` link at the bottom
* Update the `[Unreleased]` link at the bottom
1. Update the version numbers in package descriptors:
* `java/pom.xml` (`${version}-SNAPSHOT`)
* `javascript/package.json`
* `ruby/VERSION`
1. Commit and push
```
git add .
git commit -m "Release $next_release"
git push
```

### Making a release

Only people with permission to push to `release/*` branches can make releases.

1. Push to a new `release/*` branch to trigger the [`release-*` workflows](https://github.com/cucumber/cucumber-expressions/actions)
```
git checkout -b release/v$next_release
git push --set-upstream origin release/v$next_release
```
1. Wait until the `release-*` workflows in GitHub Actions have passed
1. Rerun individual workflows if they fail
1. Consider announcing the release on Slack/Twitter/Blog
6 changes: 3 additions & 3 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
</properties>

<scm>
<connection>scm:git:git://github.com/cucumber/cucumber-expressions-java.git</connection>
<developerConnection>scm:git:git@github.com:cucumber/cucumber-expressions-java.git</developerConnection>
<url>git://github.com/cucumber/cucumber-expressions-java.git</url>
<connection>scm:git:git://github.com/cucumber/cucumber-expressions.git</connection>
<developerConnection>scm:git:git@github.com:cucumber/cucumber-expressions.git</developerConnection>
<url>git://github.com/cucumber/cucumber-expressions.git</url>
</scm>

<dependencyManagement>
Expand Down
1 change: 0 additions & 1 deletion javascript/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ dist/
coverage/
node_modules/
yarn.lock
package-lock.json
*.log
.deps
.tested*
Expand Down
Loading