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

Setup and Document Release Process #20

Merged
merged 1 commit into from
Oct 7, 2024
Merged
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
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