-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Release v0.5.1 (#32) * Release v0.5.2 * Add Dart (#36) * Add Dart installation to main image * Update changelog Used an adapted version of the script from dart-lang/sdk#26953 (comment) to work on x64 and arm64 architectures. * use nodejs 14 (#37) * use nodejs 14 * Update CHANGELOG.md * Added a pre-release workflow This workflow is designed to automatically create a PR to the release branch when the CHANGELOG is updated. * Release 0.6.0 * try something else * Revert "Release 0.6.0" This reverts commit 57f341d. * Release 0.6.0 * Try checking out release first * Revert "Release 0.6.0" This reverts commit 4d106cf. * Fix yaml syntax * Release 0.6.0 * Try as separate commands * Revert "Release 0.6.0" This reverts commit 16c6789. * Release 0.6.0 * Revert "Release 0.6.0" This reverts commit 5f8b1da. * Release 0.6.0 * Try not committing the release stuff to main yet. We can merge it back down to main once the release is done. * Revert "Release 0.6.0" This reverts commit a9dc1b6. * Use a different branch naming strategy * Try using release branch again * Follow the steps in the README to create the branch * Also checkout main * Use proper ref for main * Try git commands by hand * Name the committer * Correct name for branch * I think we can let the GH action do the commit * Push the new branch? * Better push * Fix typo * Fix bad merge * Let PR action create branch * Read current release version from git tags * Fetch tags * Better job name * Repair changelog - 0.6.0 has not been released yet! * Try to trigger pre-release for 0.6.0 again * Trigger pre-release * Tweak working in release PR Co-authored-by: Aurélien Reeves <aurelien.reeves@smartbear.com> Co-authored-by: David Goss <david@davidgoss.co> Co-authored-by: Matt Wynne <matt@cucumber.io> Co-authored-by: mattwynne <mattwynne@users.noreply.github.com>
- Loading branch information
1 parent
e2dc111
commit 9f57a1b
Showing
5 changed files
with
158 additions
and
19 deletions.
There are no files selected for viewing
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,68 @@ | ||
name: Pre-release | ||
|
||
# Prepares a new release of the build image. | ||
# | ||
# To trigger it, simply change the CHANGELOG.md file, replacing the | ||
# "Unreleased" header with the header with the new release's | ||
# version number. | ||
# | ||
# The workflow will automatically prepare a pull request to the `release` branch. | ||
# | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
|
||
versions: | ||
runs-on: ubuntu-latest | ||
name: Get version numbers | ||
outputs: | ||
released-version: ${{ steps.current-release.outputs.result }} | ||
next-version: ${{ steps.next-release.outputs.output }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: read the current release version from git tags | ||
id: current-release | ||
run: | | ||
git fetch --tags | ||
version_tag=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
version=${version_tag/v/} | ||
echo "::set-output name=result::$version" | ||
- name: read latest version from the changelog | ||
id: next-release | ||
uses: mattwynne/changelog-action@v1.2 | ||
with: | ||
args: latest | ||
|
||
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 }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: release | ||
- run: git fetch origin main | ||
- run: git checkout main | ||
- run: git checkout release | ||
- run: git rebase main | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
base: release | ||
branch: pre-release/${{ env.next_version }} | ||
title: "Release v${{ env.next_version }}" | ||
body: | | ||
Auto-generated by the [pre-release.yaml](https://github.com/cucumber/build/blob/main/.github/workflows/pre-release.yaml) 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. | ||
team-reviewers: "@cucumber/build" |
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
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
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
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,39 @@ | ||
set -e | ||
|
||
# arm or intel? | ||
arch=$([ "$TARGETARCH" == "amd64" ] && echo "x64" || echo $TARGETARCH) | ||
|
||
# Creating temp file | ||
tdir=$(mktemp -d -t dart.XXX) | ||
zip="dartsdk-linux-$arch-release.zip" | ||
sha="dartsdk-linux-$arch-release.zip.sha256sum" | ||
tzip="$tdir/$zip" | ||
tsha="$tdir/$sha" | ||
|
||
# Downloading latest stable dist | ||
wget -qO "$tzip" "https://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/$zip" | ||
wget -qO "$tsha" "https://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/$sha" | ||
|
||
chmod -R +rwx $tdir | ||
cd $tdir | ||
cat $tsha | sha256sum -c > /dev/null | ||
|
||
# Check if checksum matched | ||
if ! [ $? -eq 0 ]; then | ||
>&2 echo "ERROR: SHA-256 checksum not matching" | ||
rm -r "$tdir" | ||
exit 1 | ||
fi | ||
|
||
# Unzipping to lib location | ||
unzip -d /usr/lib $tzip > /dev/null | ||
|
||
# Enabling write and execution for the dark-sdk folder | ||
chown -R cukebot /usr/lib/dart-sdk | ||
chmod -R +rx /usr/lib/dart-sdk | ||
|
||
# Adding dart to path | ||
export PATH="$PATH:/usr/lib/dart-sdk/bin" | ||
|
||
# Removing tmp files | ||
rm -r "$tdir" |