Skip to content

Commit 1ba7f9e

Browse files
mattwynneaslakhellesoyaurelien-reeves
authored
Add a release workflow (#9)
* Add a release workflow * Tweak contributing text * Rename java test workflow * Add NPM publish job * Add working directory for publish ruby job * Add maven * Create a go/* tag * Update CONTRIBUTING.md Co-authored-by: Aurélien Reeves <[email protected]> * Update CONTRIBUTING.md Co-authored-by: Aurélien Reeves <[email protected]> * Rename and extract workflows * Misc tweaks * Fix cache path * Add status badges * Move release instructions to RELEASING.md * Consolidate release instructions from CONTRIBUTING.md to RELEASING.md * Formatting * Fix typos Co-authored-by: Aslak Hellesøy <[email protected]> Co-authored-by: Aslak Hellesøy <[email protected]> Co-authored-by: Aurélien Reeves <[email protected]>
1 parent d04c47e commit 1ba7f9e

16 files changed

+6767
-16
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Create GitHub Release
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
create-github-release:
9+
name: Create GitHub Release and Git tag
10+
runs-on: ubuntu-latest
11+
environment: Release
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: cucumber/[email protected]
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-go.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Release Go module
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
publish-go:
9+
name: Create go/* tag
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: cucumber-actions/[email protected]
13+
id: versions
14+
- name: Create go/* tag
15+
run: |
16+
git tag "go/${{ steps.versions.outputs.changelog-latest-version }}"
17+
git push --tags

.github/workflows/release-mvn.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release Maven Package
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
publish-mvn:
9+
name: Publish Maven Package
10+
runs-on: ubuntu-latest
11+
environment: Release
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-java@v1
15+
with:
16+
java-version: '11'
17+
cache: 'maven'
18+
- uses: cucumber/[email protected]
19+
with:
20+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
21+
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
22+
nexus-username: cukebot
23+
nexus-password: ${{ secrets.SONATYPE_PASSWORD }}
24+
directory: java

.github/workflows/release-npm.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release NPM module
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
publish-npm:
9+
name: Publish NPM module
10+
runs-on: ubuntu-latest
11+
environment: Release
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: '16'
17+
cache: 'npm'
18+
cache-dependency-path: javascript/ui/package-lock.json
19+
- uses: cucumber/[email protected]
20+
with:
21+
npm-token: ${{ secrets.NPM_TOKEN }}
22+
working-directory: javascript
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish Ruby Gem
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
publish-rubygem:
9+
name: Publish Ruby Gem
10+
runs-on: ubuntu-latest
11+
environment: Release
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: 3.0.2
17+
bundler-cache: true
18+
- uses: cucumber/[email protected]
19+
with:
20+
rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
21+
working_directory: ruby
File renamed without changes.
File renamed without changes.

.github/workflows/javascript.yml renamed to .github/workflows/test-javascript.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
uses: actions/setup-node@v2
3030
with:
3131
node-version: ${{ matrix.node-version }}
32+
cache: 'npm'
33+
cache-dependency-path: ./javascript/package-lock.json
3234
- run: npm i -g npm@7
33-
- name: npm install-test
35+
- run: npm install-test
3436
working-directory: ./javascript
35-
run: npm install-test
36-
File renamed without changes.

ARCHITECTURE.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ The AST is constructed from the following tokens:
2323

2424
```ebnf
2525
escape = "\"
26-
token = whitespace | "(" | ")" | "{" | "}" | "/" | .
27-
. = any non-reserved codepoint
26+
token = whitespace | "(" | ")" | "{" | "}" | "/" | .
27+
. = any non-reserved codepoint
2828
```
2929

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

4545
```
46-
cucumber-expression -> '^' + rewrite(node[0]) + ... + rewrite(node[n-1]) + '$'
47-
alternation -> '(?:' + rewrite(node[0]) + '|' + ... + '|' + rewerite(node[n-1]) + ')'
48-
alternative -> rewrite(node[0]) + ... + rewrite(node[n-1])
49-
optional -> '(?:' + rewrite(node[0]) + ... + rewrite(node[n-1]) + ')?'
46+
cucumber-expression -> "^" + rewrite(node[0]) + ... + rewrite(node[n-1]) + "$"
47+
alternation -> "(?:" + rewrite(node[0]) + "|" + ... + "|" + rewerite(node[n-1]) + ")"
48+
alternative -> rewrite(node[0]) + ... + rewrite(node[n-1])
49+
optional -> "(?:" + rewrite(node[0]) + ... + rewrite(node[n-1]) + ")?"
5050
parameter -> {
5151
parameter_name := node[0].text + ... + node[n-1].text
5252
parameter_pattern := parameter_type_registry[parameter_name]
53-
'((?:' + parameter_pattern[0] + ')|(?:' ... + ')|(?:' + parameter_pattern[n-1] + '))'
53+
"((?:" + parameter_pattern[0] + ")|(?:" ... + ")|(?:" + parameter_pattern[n-1] + "))"
5454
}
5555
text -> {
56-
escape_regex := escape '^', `$`, `[`, `]`, `(`, `)` `\`, `{`, `}`, `.`, `|`, `?`, `*`, `+`
57-
escape_regex(token.text)
56+
escape_regex := escape "^", "$", "[", "]", "(", ")" "\", "{", "}", ".", "|", "?", "*", "+"
57+
escape_regex(token.text)
5858
}
5959
```

0 commit comments

Comments
 (0)