Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
borsboom committed Oct 15, 2020
2 parents 23430bf + 5c5dc4c commit 9621945
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 282 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ about: Report a bug in Stack

Please follow the steps below for reporting a bug:

Make sure that you are using the latest release (currently stack-2.3.3).
Make sure that you are using the latest release (currently stack-2.5.1).
See the [upgrade instructions](http://docs.haskellstack.org/en/stable/install_and_upgrade/#upgrade) to upgrade.

Please use the following schema for your bug report:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Feature Request
about: Request a feature be added to Stack, or discuss such a feature
---

Make sure that you are using the latest release (currently stack-2.3.3).
Make sure that you are using the latest release (currently stack-2.5.1).
See the [upgrade instructions](http://docs.haskellstack.org/en/stable/install_and_upgrade/#upgrade) to upgrade.

Please state as clearly as possible what feature you are recommending,
Expand Down
103 changes: 101 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ name: Integration tests
on:
pull_request:
push:
branches: [master, stable]
branches:
- master
- stable
- rc/**
tags:
- '**'
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
Expand Down Expand Up @@ -66,7 +71,101 @@ jobs:
name: Build bindist
run: stack etc/scripts/release.hs build ${{ matrix.release-args }}

- uses: actions/upload-artifact@v2
- name: Upload bindist
uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}
path: _release/stack-*

github-release:
name: Create Github release
needs: integration-tests
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download Linux artifact
uses: actions/download-artifact@v2
with:
name: Linux
path: _release
- name: Download macOS artifact
uses: actions/download-artifact@v2
with:
name: macOS
path: _release
- name: Download Windows artifact
uses: actions/download-artifact@v2
with:
name: Windows
path: _release
- shell: bash
name: Hash and sign assets
env:
RELEASE_SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }}
run: |
set -e
echo "$RELEASE_SIGNING_KEY"|gpg --import
cd _release
for asset in *; do
shasum -a 256 "$asset" >"$asset.sha256"
gpg --digest-algo=sha512 --detach-sig --armor -u 0x575159689BEFB442 "$asset"
done
- name: Set Github ref variables
id: github_ref_vars
run: |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Create Github release (final)
if: "!startsWith(github.ref, 'refs/tags/rc/')"
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
body: |
See https://haskellstack.org/ for installation and upgrade instructions.
**Changes since v[INSERT PREVIOUS VERSION]:**
[INSERT CHANGELOG]
**Thanks to all our contributors for this release:**
[INSERT CONTRIBUTORS]
draft: true
prerelease: false
- name: Create Github release (release candidate)
if: "startsWith(github.ref, 'refs/tags/rc/')"
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
body: |
[APPEND ` (release candidate)` TO RELEASE NAME]
**Changes since v[INSERT PREVIOUS VERSION]:**
[INSERT CHANGELOG]
draft: true
prerelease: true
- name: Upload assets to Github release (final)
if: "!startsWith(github.ref, 'refs/tags/rc/')"
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "_release/*"
tag_name: ${{ steps.github_ref_vars.outputs.SOURCE_TAG }}
draft: true
prerelease: false
overwrite: true
- name: Upload assets to Github release (release candidate)
if: "startsWith(github.ref, 'refs/tags/rc/')"
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "_release/*"
tag_name: ${{ steps.github_ref_vars.outputs.SOURCE_TAG }}
draft: true
prerelease: true
overwrite: true
5 changes: 4 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ name: Unit tests
on:
pull_request:
push:
branches: [master, stable]
branches:
- master
- stable
- rc/**
workflow_dispatch:

jobs:
Expand Down
8 changes: 3 additions & 5 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Release notes:

**Changes since v2.5.1**
**Changes since v2.5.1:**

Major changes:

Expand All @@ -18,17 +18,14 @@ Bug fixes:

## v2.5.1

Release notes:

**Changes since v2.3.3**

Major changes:
* Add the `snapshot-location-base` yaml configuration option, which allows to
override the default location of snapshot configuration files. This option
affects how snapshot synonyms (LTS/Nightly) are expanded to URLs by the
`pantry` library.

* `docker-network` configuration key added to overwrite docker `--net` arg
* `docker-network` configuration key added to override docker `--net` arg

Behavior changes:

Expand Down Expand Up @@ -58,6 +55,7 @@ Bug fixes:
the build process.
[#5125](https://github.com/commercialhaskell/stack/issues/5125)


## v2.3.3

**Changes since v2.3.1**
Expand Down
10 changes: 5 additions & 5 deletions doc/GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ With that out of the way, let's dig a little bit more into these package sets,
also known as *snapshots*. We mentioned the LTS resolvers, and you can get quite a bit of
information about it at [https://www.stackage.org/lts](https://www.stackage.org/lts), including:

* The appropriate resolver value (`resolver: lts-14.27`, as is currently the latest LTS)
* The appropriate resolver value (`resolver: lts-16.15`, as is currently the latest LTS)
* The GHC version used
* A full list of all packages available in this snapshot
* The ability to perform a Hoogle search on the packages in this snapshot
Expand All @@ -467,7 +467,7 @@ default as well).

## Resolvers and changing your compiler version

Let's explore package sets a bit further. Instead of lts-14.27, let's change our
Let's explore package sets a bit further. Instead of lts-16.15, let's change our
`stack.yaml` file to use [the latest nightly](https://www.stackage.org/nightly). Right now,
this is currently 2020-03-24 - please see the resolve from the link above to get the latest.

Expand All @@ -483,8 +483,8 @@ We can also change resolvers on the command line, which can be useful in a
Continuous Integration (CI) setting, like on Travis. For example:

```
michael@d30748af6d3d:~/helloworld$ stack --resolver lts-14.27 build
Downloaded lts-14.27 build plan.
michael@d30748af6d3d:~/helloworld$ stack --resolver lts-16.15 build
Downloaded lts-16.15 build plan.
# build output ...
```

Expand Down Expand Up @@ -1143,7 +1143,7 @@ follows the Unix convention of `--` to separate these, e.g.:
```
michael@d30748af6d3d:~$ stack exec --package stm -- echo I installed the stm package via --package stm
Run from outside a project, using implicit global project config
Using latest snapshot resolver: lts-14.27
Using latest snapshot resolver: lts-16.15
Writing global (non-project-specific) config file to: /home/michael/.stack/global/stack.yaml
Note: You can change the snapshot via the resolver field there.
I installed the stm package via --package stm
Expand Down
13 changes: 7 additions & 6 deletions doc/maintainers/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,28 @@ Examples:

* In RC branch:
* Review documentation for any changes that need to be made
* Ensure all documentation pages listed in `mkdocs.yaml`
(`git diff --stat origin/stable..HEAD doc/`)
* Ensure all documentation pages listed in `mkdocs.yaml` (use `git diff
--stat origin/stable..HEAD doc/` to look for new/deleted files)
* Any new documentation pages should have the "may not be correct for
the released version of Stack" warning at the top.
* Search for old Stack version, unstable stack version, and the next
"obvious" possible versions in sequence, and
`UNRELEASED` and replace with next release version (`X.Y.1`, where Y is odd).
`UNRELEASED` and replace with next release version (`X.Y.1`, where Y is odd).
* Do **NOT** update the Dockerfiles in [stackage/automated/dockerfiles](https://github.com/commercialhaskell/stackage/tree/master/automated/dockerfiles/) yet; that will come later)
* Do **NOT** update templates in `.github` to point at the new release version yet!
* Search for old resolvers, set to latest resolver (e.g. in `doc/GUIDE.md` where it references the "currently the latest LTS")
* Look for any links to "latest" (`latest/`) documentation, replace with version tag
* Check that for any platform entries that need to be added to (or removed from)
[releases.yaml](https://github.com/fpco/stackage-content/blob/master/stack/releases.yaml),
[install_and_upgrade.md](https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md), [get-stack.sh](https://github.com/commercialhaskell/stack/blob/master/etc/scripts/get-stack.sh), and [doc/README.md](https://github.com/commercialhaskell/stack/blob/master/doc/README.md), and get.haskellstack.org redirects.
* `package.yaml`: bump to next release candidate version (bump patchlevel (fourth) component to next odd number; e.g. from `1.9.0.0` to `1.9.0.1`)
* `ChangeLog.md`
- Rename the “Unreleased changes” section to the same version as package.yaml, and mark it clearly as a release candidate (e.g. `v1.9.0.1 (release candidate)`). Remove any empty sections.

* For first release candidate:
* Re-do the pre-release checks (above section)
* `package.yaml`: bump to first odd patchlevel version (e.g. `X.Y.0.1`)
* `ChangeLog.md`
- Rename the “Unreleased changes” section to the same version as
package.yaml, and mark it clearly as a release candidate (e.g.
`vX.Y.0.1 (release candidate)`). Remove any empty sections.
* Follow steps in *Release process* below tagged with `[RC]` to make a release candidate

* For subsequent release candidates:
Expand Down
37 changes: 2 additions & 35 deletions etc/scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ release.hs

This tool automates some aspects of releasing a new version of Stack. It
currently handles some tasks that need to be performed on each platform:
building the release, running some pre-release checks, and uploading binaries to
a Github release.
building the release, running integration tests, and other pre-release checks.

See [Checklist](../../doc/maintainers/releases.md) of
additional manual release steps.
Expand All @@ -17,23 +16,6 @@ These must be installed in the PATH to use the release tool:
- stack
- git (for Windows, [msysgit](https://msysgit.github.io) is recommended).

To create a signed binary package, you need:

- GPG installed and in the PATH (included with
[msysgit](https://msysgit.github.io) on Windows)
- `dev@fpcomplete.com` secret key in GPG keyring. You may also use the
environment variable `STACK_RELEASE_GPG_KEY`, which should be
set to the hexadecimal (0xLONG) identifier of the GPG key.

To upload a binary to a Github release, you also need:

- A [Github authorization token](https://github.com/settings/tokens) with
`public_repo` scope.
- Set `GITHUB_AUTH_TOKEN` environment variable to the authorization token.
- A [Github release](https://github.com/commercialhaskell/stack/releases)
(probably as a draft) with a tag for the stack package's version (e.g.
`vX.Y.Z`).

Invocation
----------

Expand All @@ -46,28 +28,13 @@ The tool must be run in the root of the working tree.
The release tool is shake-based, so all standard shake options apply. In
addition, the following options are accepted:

* `--gpg-key`: override GPG key used to sign the distribution packages. By
default the `dev@fpcomplete.com` key is used.
* `--github-auth-token`: override the Github authorization token.
* `--github-release-tag`: overrides the Github Release tag that binaries are
* `--allow-dirty`: by default, the `check` rule aborts if the working tree is
dirty, but this will allow it to continue.
uploaded to.

You may also use the following environment variables in order to use a custom
GPG key:
* `STACK_RELEASE_GPG_KEY` should be set to the hexadecimal identifier (0xLONG) of the
GPG key

### Targets

* `release`: check, build, and upload.
* `release`: check and build.
* `check`: run pre-release checks.
* `build`: build and sign the binary distribution.
* `upload`: upload the binary distribution to the Github release.
* `build-<distro>-<ver>`: build package for Linux distribution.
* `upload-<distro>-<ver>`: upload package for Linux distribution to private package repository.
* `clean`: delete the build artifacts.

`<distro>` can have one of these values: `ubuntu`, `debian`, `centos`, `fedora`.
`<ver>` is the version of the distribution (e.g., `14.04` for Ubuntu).
Loading

0 comments on commit 9621945

Please sign in to comment.