diff --git a/github-app-token/.env.example b/.env.example similarity index 100% rename from github-app-token/.env.example rename to .env.example diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..807cb6c --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @freckle/backenders diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..1230149 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9e03b2a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +name: Release + +on: + push: + branches: main + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - id: tag + uses: freckle/haskell-tag-action@v1 + + - if: steps.tag.outputs.tag + run: stack upload --pvp-bounds lower . + env: + HACKAGE_API_KEY: ${{ secrets.HACKAGE_UPLOAD_API_KEY }} + STACK_YAML: stack-lts20.yaml diff --git a/.stack-all b/.stack-all new file mode 100644 index 0000000..011c2bf --- /dev/null +++ b/.stack-all @@ -0,0 +1,3 @@ +[versions] +# Can't go lower because we're using OverloadedRecordDot-et-al +oldest = lts-20 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..c6fc8f4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +## [_Unreleased_](https://github.com/freckle/github-app-token/compare/v0.0.0.1...main) + +## [v0.0.0.1](https://github.com/freckle/github-app-token/tree/v0.0.0.1) + +First tagged pre-release. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5788a64 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2024 Renaissance Learning Inc + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/github-app-token/README.lhs b/README.lhs similarity index 73% rename from github-app-token/README.lhs rename to README.lhs index 4356b95..4a9b976 100644 --- a/github-app-token/README.lhs +++ b/README.lhs @@ -1,5 +1,10 @@ # GitHub App Token +[![Hackage](https://img.shields.io/hackage/v/github-app-token.svg?style=flat)](https://hackage.haskell.org/package/github-app-token) +[![Stackage Nightly](http://stackage.org/package/github-app-token/badge/nightly)](http://stackage.org/nightly/package/github-app-token) +[![Stackage LTS](http://stackage.org/package/github-app-token/badge/lts)](http://stackage.org/lts/package/github-app-token) +[![CI](https://github.com/freckle/github-app-token/actions/workflows/ci.yml/badge.svg)](https://github.com/freckle/github-app-token/actions/workflows/ci.yml) + [Generate an installation access token for a GitHub App][docs] [docs]: https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation @@ -58,3 +63,7 @@ main = do example ``` --> + +--- + +[CHANGELOG](./CHANGELOG.md) | [LICENSE](./LICENSE) diff --git a/github-app-token/README.md b/README.md similarity index 100% rename from github-app-token/README.md rename to README.md diff --git a/github-app-token/github-app-token.cabal b/github-app-token.cabal similarity index 99% rename from github-app-token/github-app-token.cabal rename to github-app-token.cabal index 3d941f7..5b5c63c 100644 --- a/github-app-token/github-app-token.cabal +++ b/github-app-token.cabal @@ -5,7 +5,7 @@ cabal-version: 1.18 -- see: https://github.com/sol/hpack name: github-app-token -version: 0.0.0.0 +version: 0.0.0.1 synopsis: Generate an installation access token for a GitHub App description: Please see README.md category: HTTP diff --git a/github-app-token/CHANGELOG.md b/github-app-token/CHANGELOG.md deleted file mode 100644 index 4640904..0000000 --- a/github-app-token/CHANGELOG.md +++ /dev/null @@ -1 +0,0 @@ -# TODO diff --git a/github-app-token/package.yaml b/package.yaml similarity index 99% rename from github-app-token/package.yaml rename to package.yaml index 6a3a44e..45b7194 100644 --- a/github-app-token/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: github-app-token -version: 0.0.0.0 +version: 0.0.0.1 maintainer: Freckle Education category: HTTP github: freckle/github-app-token diff --git a/github-app-token/src/GitHub/App/Token.hs b/src/GitHub/App/Token.hs similarity index 100% rename from github-app-token/src/GitHub/App/Token.hs rename to src/GitHub/App/Token.hs diff --git a/github-app-token/src/GitHub/App/Token/AppCredentials.hs b/src/GitHub/App/Token/AppCredentials.hs similarity index 100% rename from github-app-token/src/GitHub/App/Token/AppCredentials.hs rename to src/GitHub/App/Token/AppCredentials.hs diff --git a/github-app-token/src/GitHub/App/Token/Generate.hs b/src/GitHub/App/Token/Generate.hs similarity index 100% rename from github-app-token/src/GitHub/App/Token/Generate.hs rename to src/GitHub/App/Token/Generate.hs diff --git a/github-app-token/src/GitHub/App/Token/JWT.hs b/src/GitHub/App/Token/JWT.hs similarity index 100% rename from github-app-token/src/GitHub/App/Token/JWT.hs rename to src/GitHub/App/Token/JWT.hs diff --git a/github-app-token/src/GitHub/App/Token/Prelude.hs b/src/GitHub/App/Token/Prelude.hs similarity index 100% rename from github-app-token/src/GitHub/App/Token/Prelude.hs rename to src/GitHub/App/Token/Prelude.hs diff --git a/stack-lts20.yaml b/stack-lts20.yaml new file mode 100644 index 0000000..fc9172f --- /dev/null +++ b/stack-lts20.yaml @@ -0,0 +1 @@ +resolver: lts-20.26 diff --git a/stack-lts21.yaml b/stack-lts21.yaml new file mode 100644 index 0000000..377040a --- /dev/null +++ b/stack-lts21.yaml @@ -0,0 +1 @@ +resolver: lts-21.25 diff --git a/stack-lts22.yaml b/stack-lts22.yaml new file mode 100644 index 0000000..86cc76a --- /dev/null +++ b/stack-lts22.yaml @@ -0,0 +1 @@ +resolver: lts-22.34 diff --git a/stack-nightly.yaml b/stack-nightly.yaml new file mode 100644 index 0000000..debaf1e --- /dev/null +++ b/stack-nightly.yaml @@ -0,0 +1,12 @@ +resolver: nightly-2024-09-12 + +extra-deps: + - jwt-0.11.0 + + # for jtw + - cryptostore-0.3.1.0 + - x509-1.7.7 + - x509-store-1.6.9 + + # for cryptostore + - x509-validation-1.6.12 diff --git a/stack.yaml b/stack.yaml index 4c7ab5b..86cc76a 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1 @@ resolver: lts-22.34 -packages: - - github-app-token - # - github-app-token-cli