Skip to content

Commit 1cc2ef0

Browse files
authored
Setup building and releasing with Github Actions (#3)
With Github Actions each language is build and tested independently from the others. This significantly releases the complexity of the build environment needed. Additionally, for the same reason, code generation is no longer included in the build process. Rather all generated files are checked in. Two seperate make command exists to copy gherkin-languages.json and generate parsers using Berp.
1 parent c35db4a commit 1cc2ef0

File tree

175 files changed

+4546
-14312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+4546
-14312
lines changed

.github/renovate.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": [
3+
"config:base",
4+
":preserveSemverRanges",
5+
":rebaseStalePrs",
6+
":disableDependencyDashboard"
7+
],
8+
"labels": [":robot: dependencies"],
9+
"prHourlyLimit": 0,
10+
"packageRules": [
11+
{
12+
"depTypeList": ["devDependencies", "dependencies"],
13+
"updateTypes": ["minor", "patch"],
14+
"automerge": true,
15+
"automergeType": "branch"
16+
}
17+
]
18+
}

.github/workflows/release-cpan.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release Perl/CPAN
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
create-perl-release:
9+
name: Publish to CPAN
10+
runs-on: ubuntu-latest
11+
environment: Release
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: cucumber/[email protected]
17+
with:
18+
cpan-user: ${{ secrets.CPAN_USER }}
19+
cpan-password: ${{ secrets.CPAN_PASSWORD }}
20+
working-directory: 'perl'

.github/workflows/release-github.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release GitHub
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@v3
16+
- uses: cucumber/[email protected]
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-go.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release Go
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
read-version:
9+
name: Read version to release
10+
runs-on: ubuntu-latest
11+
outputs:
12+
version: ${{ steps.versions.outputs.changelog-latest-version }}
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: cucumber/[email protected]
16+
id: versions
17+
18+
publish-go:
19+
name: Create go/v* tag
20+
runs-on: ubuntu-latest
21+
needs: read-version
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Create git tag
25+
run: |
26+
git tag "go/v${{ needs.read-version.outputs.version }}"
27+
git push --tags

.github/workflows/release-hex.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release Elixir hex package
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
create-hex-release:
9+
name: Publish to hex.pm
10+
runs-on: ubuntu-latest
11+
environment: Release
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- uses: erlef/setup-beam@v1
18+
with:
19+
otp-version: '22.2'
20+
elixir-version: '1.10.x'
21+
22+
- name: Install Protoc
23+
uses: arduino/setup-protoc@v1
24+
25+
- uses: cucumber/[email protected]
26+
with:
27+
hex-api-key: ${{ secrets.HEX_API_KEY }}
28+
working-directory: 'elixir'

.github/workflows/release-mvn.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release Maven
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@v3
14+
- uses: actions/setup-java@v3
15+
with:
16+
distribution: 'temurin'
17+
java-version: '11'
18+
cache: 'maven'
19+
- uses: cucumber/[email protected]
20+
with:
21+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
22+
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
23+
nexus-username: cukebot
24+
nexus-password: ${{ secrets.SONATYPE_PASSWORD }}
25+
working-directory: java

.github/workflows/release-npm.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release NPM
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@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: '16'
17+
cache: 'npm'
18+
cache-dependency-path: javascript/package-lock.json
19+
- run: npm install-test
20+
working-directory: javascript
21+
- uses: cucumber/[email protected]
22+
with:
23+
npm-token: ${{ secrets.NPM_TOKEN }}
24+
working-directory: javascript

.github/workflows/release-nuget.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release NuGet
2+
3+
on:
4+
push:
5+
branches:
6+
- "release/*"
7+
8+
jobs:
9+
publish-nuget:
10+
name: Publish package to NuGet.org
11+
runs-on: ubuntu-latest
12+
environment: Release
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v3
17+
with:
18+
dotnet-version: 6.0.x
19+
- uses: cucumber/[email protected]
20+
with:
21+
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
22+
working-directory: "dotnet"

.github/workflows/release-php.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release PHP
2+
3+
on:
4+
push:
5+
branches: [release/*]
6+
7+
jobs:
8+
create-php-release:
9+
name: Publish to PHP subrepo
10+
runs-on: ubuntu-latest
11+
environment: Release
12+
permissions:
13+
contents: write
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: '0'
18+
- uses: cucumber/[email protected]
19+
with:
20+
working-directory: php
21+
github-token: ${{ secrets.CUKEBOT_GITHUB_TOKEN }}

.github/workflows/release-rubygem.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release RubyGems
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@v3
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

.github/workflows/test-c.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: test-c
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- renovate/**
8+
pull_request:
9+
branches:
10+
- main
11+
workflow_call:
12+
13+
jobs:
14+
test-c:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: run make
21+
run: make
22+
working-directory: c

.github/workflows/test-codegen.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: test-codegen
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- renovate/**
8+
pull_request:
9+
branches:
10+
- main
11+
workflow_call:
12+
13+
jobs:
14+
test-codegen:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- uses: actions/setup-dotnet@v3
21+
with:
22+
dotnet-version: '5.0.x'
23+
24+
- name: install berp
25+
run: |
26+
dotnet tool update Berp --version 1.3.0 --tool-path ~/bin
27+
echo "~/bin" >> $GITHUB_PATH
28+
29+
- name: generate code for all languages
30+
run: |
31+
make clean-gherkin-languages
32+
make copy-gherkin-languages
33+
34+
make clean-generate
35+
make generate
36+
37+
- name: check the repo is still clean after generation
38+
run: |
39+
git status --porcelain
40+
git diff HEAD
41+
[ -z "$(git status --porcelain)" ]

.github/workflows/test-dart.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: test-dart
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- renovate/**
8+
pull_request:
9+
branches:
10+
- main
11+
workflow_call:
12+
13+
jobs:
14+
test-dart:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: install dart
21+
uses: dart-lang/[email protected]
22+
23+
- name: run tests
24+
run: dart test
25+
working-directory: dart

.github/workflows/test-dotnet.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: test-dotnet
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- renovate/**
8+
pull_request:
9+
branches:
10+
- main
11+
workflow_call:
12+
13+
jobs:
14+
test-dotnet:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-dotnet@v3
20+
with:
21+
dotnet-version: '5.0.x'
22+
23+
- run: dotnet test
24+
working-directory: dotnet
25+
26+
- name: run acceptance tests
27+
run: make acceptance
28+
working-directory: dotnet

.github/workflows/test-elixir.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: test-elixir
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- renovate/**
8+
pull_request:
9+
branches:
10+
- main
11+
workflow_call:
12+
13+
jobs:
14+
test-elixir:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: erlef/setup-beam@v1
20+
with:
21+
otp-version: '22.2'
22+
elixir-version: '1.10.x'
23+
24+
- name: Install Protoc
25+
uses: arduino/setup-protoc@v1
26+
27+
- run: |
28+
mix local.hex --force
29+
mix deps.get
30+
working-directory: elixir
31+
32+
- run: mix test
33+
working-directory: elixir
34+
35+
- name: run acceptance tests
36+
run: make acceptance
37+
working-directory: elixir

0 commit comments

Comments
 (0)