Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release] 0.0.0-release-test #459

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Prepare Release

on:
push:
branches:
- shon/releases-via-ci
pull_request:
branches:
- shon/releases-via-ci
# FIXME
# workflow_dispatch:
# inputs:
# release_version:
# description: "Version to release"
# required: false
# default: ""
# schedule:
# # * is a special character in YAML so you have to quote this string
# # Automatically prepares a minor version release every Monday
# - cron: "* * * * 1"

jobs:
prepare-release:
env:
RELEASE_VERSION: 0.0.0-testing-release-ci
# RELEASE_VERSION: ${{ github.event.inputs.release_version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v1
with:
java-version: 1.8
- run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "[email protected]"
./script/release-prepare.sh
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: release

on:
push:
branches: unstable
# This file only changes when we've prepared a new release
paths: ./RELEASE-NOTES.md

jobs:
cut-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cut Release
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "[email protected]"
cit checkout HEAD~1
./script/release-pgk.sh
22 changes: 22 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@
This file is generated. Do not write release notes here.
Notes for unreleased changes go in ./UNRELEASED.md -->

## 0.0.0-release-test

### Bug fixes

* critical bugfix in unique renaming, #429

### Features

* opt-in for statistics collection (shared with TLC and TLA+ Toolbox), see #288

### Architecture

* new layer of TransitionExecutor (TRex), see `at.forsyte.apalache.tla.bmcmt.trex.*`

### Documentation

* Compile the manuals into [a static
site](http://informalsystems.github.io/apalache/docs/) using
[mdBook](https://github.com/rust-lang/mdBook), see #400
* Description of top-level user operators, see #419
* ADR003: [Architecture of TransitionExecutor](./docs/internal/adr/003adr-trex.md)

## 0.8.0 [RELEASE]

* use openjdk-9 for deterministic Apalache Docker images, see #318
Expand Down
17 changes: 10 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,24 +235,27 @@ Changes for a given release should be split between the five sections:

## Releases

You must have release-me installed and configured with a token. See
https://pypi.org/project/release-me/
### Requirements

Assuming the current version recorded in the project's `pom.xml` files is
`l.m.n-SNAPSHOT`, the manual release process is as follows:
- [release-me](https://pypi.org/project/release-me/) installed and configured with a token
- [hub](https://github.com/github/hub) installed
- With a `GITHUB_TOKEN` variable in your shell environment holding an access
token with repo permissions (you can use the same token as for
`release-me`).

### Prepare the release

Assuming the current version recorded in the project's `pom.xml` files is
`l.m.n-SNAPSHOT`, the manual release process is as follows:

- [ ] `git checkout unstable && git pull`
- [ ] Run `./script/release-prepare.sh` to
- create and checkout a branch `release/l.m.n`.
- prepare and add a release commit `[release] l.m.n`
- [ ] Run `./script/version-bump.sh` to
- update the changelog
- bump the version number
- commit the changes
- [ ] Open a PR merging the newly created branch into `unstable`, with the title
`[release] l.m.n`.
- opens a pr into `unstable` with the title `[release] l.m.n`.
- [ ] Get the PR reviewed and merged and **DO NOT SQUASH THE CHANGES** on merge.

If you need to set a specific version (e.g., to increment to a major version),
Expand Down
19 changes: 0 additions & 19 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,3 @@
* Another change description, see #124

DO NOT LEAVE A BLANK LINE BELOW THIS PREAMBLE -->
### Bug fixes

* critical bugfix in unique renaming, #429

### Features

* opt-in for statistics collection (shared with TLC and TLA+ Toolbox), see #288

### Architecture

* new layer of TransitionExecutor (TRex), see `at.forsyte.apalache.tla.bmcmt.trex.*`

### Documentation

* Compile the manuals into [a static
site](http://informalsystems.github.io/apalache/docs/) using
[mdBook](https://github.com/rust-lang/mdBook), see #400
* Description of top-level user operators, see #419
* ADR003: [Architecture of TransitionExecutor](./docs/internal/adr/003adr-trex.md)
4 changes: 2 additions & 2 deletions mod-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<parent>
<groupId>at.forsyte.apalache</groupId>
<artifactId>apalache</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
</parent>

<artifactId>apalache-pkg</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
<packaging>pom</packaging>

<name>apalache-pkg</name>
Expand Down
4 changes: 2 additions & 2 deletions mod-infra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>at.forsyte.apalache</groupId>
<artifactId>apalache</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
</parent>

<artifactId>infra</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
<packaging>jar</packaging>

<name>infra</name>
Expand Down
4 changes: 2 additions & 2 deletions mod-tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<parent>
<groupId>at.forsyte.apalache</groupId>
<artifactId>apalache</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
</parent>

<!--
All command line tooling and option parsing goes here... and nothing else!
-->
<artifactId>tool</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
<packaging>jar</packaging>

<name>tool</name>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>at.forsyte.apalache</groupId>
<artifactId>apalache</artifactId>
<packaging>pom</packaging>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>

<name>APALACHE project</name>
<url>https://github.com/informalsystems/apalache</url>
Expand Down
40 changes: 40 additions & 0 deletions script/release-pkg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
set -euo pipefail

set -o xtrace

# Package a release and tag the commit

# The directory of this file
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# shellcheck source=./shared.sh
. "$DIR"/shared.sh

msg=$(git show -s --format=%s HEAD)

if ! [[ "$msg" != "[release] ${VERSION}" ]]
then
echo "error: HEAD commit must be a [release] commit"
echo "found: ${msg}"
exit 4
fi

release="mod-distribution/target/apalache-pkg-${VERSION}-full.jar"

if [ ! -f "$release" ]; then
echo "Release file not found: $release"
exit 3
fi

# TODO remove echos
echo git tag -a "v${VERSION}" -m "$msg"
echo git push -tags

# overwrite the build number
BUILD=$(git describe --tags)

ZIPF="apalache-${BUILD}.zip"
TGZF="apalache-${BUILD}.tgz"

zip -r "$ZIPF" bin/apalache-mc "$release"
tar zpcf "$TGZF" bin/apalache-mc "$release"
14 changes: 13 additions & 1 deletion script/release-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ fi
git checkout -b "release/${RELEASE_VERSION}"
RELEASE_VERSION=$RELEASE_VERSION "$DIR"/release-notes.sh

# Make the release commit
commit_msg="[release] ${RELEASE_VERSION}"
git add --update
git add "$RELEASE_NOTES"
git commit -m "[release] ${RELEASE_VERSION}"
git commit -m "$commit_msg"

body=$(cat "$RELEASE_NOTES")
pr_msg=$(printf "%s\n\n%s" "$commit_msg" "$body")

# Bump the version
"$DIR"/version-bump.sh

# Open a pull request for the release
# See https://hub.github.com/hub-pull-request.1.html
hub pull-request --message="$pr_msg" --push --base="unstable"
2 changes: 1 addition & 1 deletion script/version-bump.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail

# set -o xtrace
set -o xtrace

# Increment the version to a SNAPSHOT and update the changelog

Expand Down
4 changes: 2 additions & 2 deletions tla-assignments/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<parent>
<groupId>at.forsyte.apalache</groupId>
<artifactId>apalache</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
</parent>

<artifactId>tla-assignments</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
<packaging>jar</packaging>

<name>tla-assignments</name>
Expand Down
4 changes: 2 additions & 2 deletions tla-bmcmt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>at.forsyte.apalache</groupId>
<artifactId>apalache</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
</parent>

<artifactId>tla-bmcmt</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
<packaging>jar</packaging>

<name>tla-bmcmt</name>
Expand Down
4 changes: 2 additions & 2 deletions tla-import/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>at.forsyte.apalache</groupId>
<artifactId>apalache</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
</parent>

<artifactId>tla-import</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
<packaging>jar</packaging>

<name>tla-import</name>
Expand Down
4 changes: 2 additions & 2 deletions tla-pp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>at.forsyte.apalache</groupId>
<artifactId>apalache</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
</parent>

<artifactId>tla-pp</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
<packaging>jar</packaging>

<name>tla-pp</name>
Expand Down
4 changes: 2 additions & 2 deletions tla-types/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<parent>
<groupId>at.forsyte.apalache</groupId>
<artifactId>apalache</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
</parent>

<artifactId>tla-types</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
<packaging>jar</packaging>

<name>tla-types</name>
Expand Down
4 changes: 2 additions & 2 deletions tlair/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<parent>
<groupId>at.forsyte.apalache</groupId>
<artifactId>apalache</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
</parent>

<artifactId>tlair</artifactId>
<version>0.8.1-SNAPSHOT</version>
<version>0.0.1-release-test-SNAPSHOT</version>
<packaging>jar</packaging>

<name>tlair</name>
Expand Down