-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove cucumber dependency to wire (#46) * Update dependencies to work with dedicated branch of cucumber * Add the registry in the AfterConfiguration hook * Update features to load cucumber/wire as part of the tests * Allow usage with future version of cucumber-ruby * Emphase 'built-in' in UPGRADING documentation * Setup github workflow * Remove windows from GH Workflow * Remove jruby from GH Workflow * Schedule GH workflow at 5am every day * [skip ci]Rename GH workflow * Use quotes with ruby 3.0 * Make the changelog more parseable * Remove circle-ci (#47) * Add pre-release workflow * Prepare release 6.1.0 * Reformat CHANGELOG.md to match `changelog` tool format See https://github.com/rcmachado/changelog * Move changelog-action to cucumber-actions org * Delegate to cucumber-actions/get-released-version * Simplifyy We don't have "v"s in CHANGELOG headers to no need to clean up * Fix release label for cucumber-actions/get-released-version * Update UPGRADING.md Finally, the deprecation will happen in a cucumber v8.0.0 and removed in v9.0.0 due to breaking changes. * Update GH Workflow to reduce chances of flaky jobs * Fix GH Workflow * Add release workflow for automating releases of the gem (#49) * Add release workflow for automating releases of the gem * Use bare metal `gem` commands to publish Why? * reduced security exposure * let the `gh release` command create the tag * simpler * Narrow scope of GITHUB_TOKEN * Simplfy how we handle the version number to be released * Use environment variable to pass API key to `gem push` See https://guides.rubygems.org/command-reference/ * Ping the core team to review a release PR * Update docs about how to release Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com> Co-authored-by: Matt Wynne <matt@cucumber.io>
- Loading branch information
1 parent
1ca2674
commit 0b7039f
Showing
21 changed files
with
342 additions
and
190 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | ||
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | ||
|
||
name: Test cucumber-wire | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: "0 5 * * *" | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' | ||
ruby: [2.5, 2.6, 2.7, '3.0'] | ||
include: | ||
- os: macos-latest | ||
ruby: '3.0' | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | ||
# change this to (see https://github.com/ruby/setup-ruby#versioning): | ||
uses: ruby/setup-ruby@v1 | ||
# uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- name: Run tests | ||
run: bundle exec rake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Pre-release | ||
|
||
# Prepares a new releas | ||
# | ||
# To trigger it, simply change the CHANGELOG.md file, replacing the | ||
# "Unreleased" header text with the new release's version number. | ||
# | ||
# The workflow will automatically prepare a pull request for the release. | ||
# | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
|
||
versions: | ||
runs-on: ubuntu-latest | ||
name: Get version numbers | ||
outputs: | ||
released-version: ${{ steps.current-release.outputs.number }} | ||
next-version: ${{ steps.next-release.outputs.result }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: read the current release version from git tags | ||
uses: cucumber-actions/get-released-version@v1.0.0 | ||
id: current-release | ||
- name: read latest version from the changelog | ||
uses: cucumber-actions/changelog-action@v1.3 | ||
with: | ||
args: latest | ||
id: next-release | ||
- name: Report version numbers detected | ||
run: | | ||
echo "Released: ${{ steps.current-release.outputs.number }}" | ||
echo "Next: ${{ steps.next-release.outputs.result }}" | ||
create-release-pr: | ||
runs-on: ubuntu-latest | ||
name: Create / Update Release PR | ||
needs: versions | ||
if: needs.versions.outputs.released-version != needs.versions.outputs.next-version | ||
env: | ||
next_version: ${{ needs.versions.outputs.next-version }} | ||
released_version: ${{ needs.versions.outputs.released-version }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Create/update target branch for release, based on previous release | ||
run: | | ||
git checkout v${{ env.released_version }} | ||
git checkout -b release/v${{ env.next_version }} | ||
git push --force --set-upstream origin release/v${{ env.next_version }} | ||
- name: Create/update a branch off `main` for the commit to be released | ||
run: | | ||
git checkout ${{ github.ref }} | ||
git checkout -b pre-release/v${{ env.next_version }} | ||
git push --force --set-upstream origin pre-release/v${{ env.next_version }} | ||
- name: Check for existing PR for this release | ||
id: pr-already-exists | ||
run: | | ||
output=$(gh pr list --base release/v${{ env.next_version }}) | ||
exists=$([[ $output == *"Release v${{ env.next_version }}"* ]] && echo "exists" || echo "") | ||
echo "::set-output name=result::$exists" | ||
- name: Create Pull Request | ||
if: ${{ !steps.pr-already-exists.outputs.result }} | ||
run: | | ||
ref="${{ github.ref }}" | ||
branch=${ref/refs\/heads\//} | ||
cat >${{ runner.temp }}/body <<EOT | ||
Auto-generated by the [pre-release.yaml](https://github.com/${{ github.repository }}/blob/main/.github/workflows/pre-release.yml) workflow, because the CHANGELOG.md | ||
file contains a header for v${{ env.next_version }}. | ||
The latest git tag is v${{ env.released_version }}, so it looks like a release is needed. | ||
Review this PR carefully. When it's merged, the v${{ env.next_version }} release will happen automatically. | ||
If you need to make changes to this release, just push more commits to the \`${branch}\` branch and this PR will be automatically updated. | ||
EOT | ||
gh pr create \ | ||
--base release/v${{ env.next_version }} \ | ||
--head pre-release/v${{ env.next_version }} \ | ||
--title "Release v${{ env.next_version }}" \ | ||
--body-file ${{ runner.temp }}/body \ | ||
--reviewer @cucumber/cucumber-ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- release/* | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
environment: Release | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Read version to release from the changelog | ||
id: next-release | ||
uses: cucumber-actions/changelog-action@v1.3 | ||
with: | ||
args: latest | ||
- name: Set version environment variable | ||
run: echo "version"=${{ steps.next-release.outputs.result }} > $GITHUB_ENV | ||
- name: read latest version from the changelog | ||
id: release-notes | ||
uses: mattwynne/changelog-action@v1.3 | ||
with: | ||
args: show ${{ env.version }} | ||
- name: Create release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
cat >${{ runner.temp }}/notes <<EOT | ||
${{ steps.release-notes.outputs.result }} | ||
EOT | ||
gh release create \ | ||
--notes-file ${{ runner.temp }}/notes \ | ||
v${{ env.version }} | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 | ||
bundler-cache: true | ||
- name: Release to Rubygems | ||
env: | ||
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }} | ||
run: | | ||
bundle exec gem build | ||
bundle exec gem push cucumber-wire-${{ env.version }}.gem |
Oops, something went wrong.