Skip to content

Commit

Permalink
Merge pull request #20 from telostat/19-find-a-solution-to-automate-r…
Browse files Browse the repository at this point in the history
…eleases

Setup and Document Release Process
  • Loading branch information
vst authored Oct 7, 2024
2 parents 07b5eb9 + db86cd5 commit f0391a9
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Changelog

{{ if .Versions -}}
<a name="unreleased"></a>
## [Unreleased]
Expand Down
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,59 @@ To test and build codebase in development environment, run:
dev-test-build
```

## Making Releases

1. Checkout `main` branch:

```sh
git checkout main
```

2. Ensure that your branch is up to date:

```sh
git pull
```

3. Update the `version` information in [package.yaml](./package.yaml) if
required, run `hpack` to reflect the change on the `.cabal` file, and
recompile the project, run tests and generate Haddock documentation:

```sh
nix-shell --run "dev-test-build -c"
```

4. Update [CHANGELOG.md](./CHANGELOG.md) file:

```sh
git-chglog --next-tag <NEW-VERSION> -o CHANGELOG.md
```

5. Commit, tag and push:

```sh
git commit -am "chore(release): <NEW-VERSION>"
git tag -a -m "Release <NEW-VERSION>" <NEW-VERSION>
git push --follow-tags origin main
```

6. Create the package, upload to Hackage as a candidate first and check the result:

```sh
nix-shell --run "dev-test-build -c"
nix-shell --run "cabal sdist"
nix-shell --run "cabal upload dist-newstyle/sdist/haspara-<VERSION>.tar.gz"
```

7. If the candidate package release works fine, release to Hackage:

```sh
nix-shell --run "cabal upload --publish dist-newstyle/sdist/haspara-<VERSION>.tar.gz"
```

8. Make sure that the release is available on [Hackage](https://hackage.haskell.org/package/haspara).
9. Make sure that the release is available on [GitHub](https://github.com/telostat/haspara/releases).

## License

Copyright Telostat Pte Ltd (c) 2021-2024.
Expand Down
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ let
## Other build inputs for various development requirements:
pkgs.docker-client
pkgs.git
pkgs.git-chglog
pkgs.nil
pkgs.nixpkgs-fmt
pkgs.nodePackages.prettier
Expand Down

0 comments on commit f0391a9

Please sign in to comment.