Skip to content

Commit

Permalink
Merge pull request #367 from profunktor/various-updates
Browse files Browse the repository at this point in the history
Various updates to make a new release
  • Loading branch information
gvolpe authored Jan 25, 2023
2 parents 748b872 + e72f2e6 commit e8647d4
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 64 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-18.04
strategy:
matrix:
java:
- jdk15
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]

- name: "Cache for sbt & coursier ♨️"
uses: coursier/[email protected]

- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v12
uses: cachix/install-nix-action@v18

- name: "Run with ${{ matrix.java }} 🚀"
run: nix-shell --argstr java "${{ matrix.java }}" --run "sbt ++ 'test;mdoc'"
run: nix develop -c sbt 'clean;mdoc;++test'
19 changes: 10 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ on:
jobs:
build:
name: Publish
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- name: java 11 setup
uses: olafurpg/setup-java@v10
- uses: actions/[email protected]
with:
java-version: '11'
- uses: olafurpg/setup-gpg@v3
- env:
fetch-depth: 0 # fetch all branches & tags

- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v18

- name: "Publish ${{ github.ref }} 🚀"
env:
PGP_PASSPHRASE: "${{ secrets.PGP_PASSPHRASE }}"
PGP_SECRET: "${{ secrets.PGP_SECRET }}"
SONATYPE_PASSWORD: "${{ secrets.SONATYPE_PASSWORD }}"
SONATYPE_USERNAME: "${{ secrets.SONATYPE_USERNAME }}"
name: "Publish ${{ github.ref }}"
run: sbt ci-release
run: nix develop -c sbt ci-release
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
http4s-jwt-auth
===============

[![CI Status](https://github.com/profunktor/http4s-jwt-auth/workflows/Build/badge.svg)](https://github.com/profunktor/http4s-jwt-auth/actions)
[![CI Status](https://github.com/profunktor/http4s-jwt-auth/workflows/Scala/badge.svg)](https://github.com/profunktor/http4s-jwt-auth/actions)
[![Gitter Chat](https://badges.gitter.im/profunktor-dev/http4s-jwt-auth.svg)](https://gitter.im/profunktor-dev/http4s-jwt-auth)
[![Maven Central](https://img.shields.io/maven-central/v/dev.profunktor/http4s-jwt-auth_2.12.svg)](http://search.maven.org/#search%7Cga%7C1%7Chttp4s-jwt-auth) <a href="https://typelevel.org/cats/"><img src="https://raw.githubusercontent.com/typelevel/cats/c23130d2c2e4a320ba4cde9a7c7895c6f217d305/docs/src/main/resources/microsite/img/cats-badge.svg" height="40px" align="right" alt="Cats friendly" /></a>
[![MergifyStatus](https://img.shields.io/endpoint.svg?url=https://gh.mergify.io/badges/profunktor/http4s-jwt-auth&style=flat)](https://mergify.io)
[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-brightgreen.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)

Opinionated [JWT](https://tools.ietf.org/html/rfc7519) authentication library for [http4s](https://http4s.org/).
Expand Down Expand Up @@ -44,13 +43,15 @@ val securedRoutes: HttpRoutes[IO] = middleware(routes)

### Build microsite

If you only need `jekyll` for this, it is recommended to use `nix-shell` to avoid installing it globally:
You need to have `jekyll` installed before running the following command:

``` console
$ sbt makeMicrosite
$ cd site/target/site
$ jekyll serve
```
nix-shell -p jekyll
sbt makeMicrosite
cd site/target/site && jekyll serve
```

Or you can use `nix develop` by leveraging the `flake.nix` in this repo.

### Notes

Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Dependencies._
import microsites.ExtraMdFileConfig

ThisBuild / organizationName := "ProfunKtor"
ThisBuild / crossScalaVersions := List("2.12.15", "2.13.8", "3.1.2")
ThisBuild / crossScalaVersions := List("2.12.15", "2.13.8", "3.2.1")

// publishing
ThisBuild / name := """http4s-jwt-auth"""
Expand All @@ -16,7 +16,7 @@ ThisBuild / developers := List(
"gvolpe",
"Gabriel Volpe",
"[email protected]",
url("https://gvolpe.github.io")
url("https://gvolpe.com")
)
)

Expand Down
43 changes: 43 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
description = "Scala development shell";

inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
flake-utils.url = github:numtide/flake-utils;
};

outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
jreOverlay = f: p: {
jre = p.jdk19;
};

pkgs = import nixpkgs {
inherit system;
overlays = [ jreOverlay ];
};
in
{
devShell = pkgs.mkShell {
name = "scala-dev-shell";

buildInputs = with pkgs; [
gnupg
jekyll
jre
sbt
];

JAVA_HOME = "${pkgs.jre}";
};
}
);
}
39 changes: 0 additions & 39 deletions shell.nix

This file was deleted.

0 comments on commit e8647d4

Please sign in to comment.