diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..02389dc --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,49 @@ +name: publish + +on: + push: + branches: + - master + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: erlef/setup-beam@v1 + with: + otp-version: "26.0.2" + gleam-version: "1.4.1" + rebar3-version: "3" + # elixir-version: "1.15.4" + - run: gleam deps download + - run: gleam test + - run: gleam format --check src test + + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: erlef/setup-beam@v1 + with: + otp-version: "26.0.2" + gleam-version: "1.4.1" + rebar3-version: "3" + # elixir-version: "1.15.4" + + - name: Load secret + uses: 1password/load-secrets-action@v2 + with: + # Export loaded secrets as environment variables + export-env: true + env: + OP_SERVICE_ACCOUNT_TOKEN: "${{secrets.OP_SERVICE_ACCOUNT_TOKEN}}" + HEXPM_USER: "op://wisp-kv-sessions/Hex/username" + HEXPM_PASS: "op://wisp-kv-sessions/Hex/password" + + + - name: Print masked secret + run: 'echo "USER: $HEXPM_USER", "PW: $HEXPM_PASS"' + + - run: gleam publish --yes diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 06d00ad..fa9ab2f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,8 +3,7 @@ name: test on: push: branches: - - master - - main + - develop pull_request: jobs: diff --git a/README.md b/README.md index ef02608..170c69f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # wisp_kv_sessions -[![Package Version](https://img.shields.io/hexpm/v/max_wisp_sessions)](https://hex.pm/packages/max_wisp_sessions) -[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/max_wisp_sessions/) +[![Package Version](https://img.shields.io/hexpm/v/wisp_kv_sessions)](https://hex.pm/packages/wisp_kv_sessions) +[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/wisp_kv_sessions/) # Overview diff --git a/gleam.toml b/gleam.toml index 5a80595..6b2052d 100644 --- a/gleam.toml +++ b/gleam.toml @@ -1,12 +1,12 @@ name = "wisp_kv_sessions" -version = "1.0.0" +version = "0.0.1" # Fill out these fields if you intend to generate HTML documentation or publish # your project to the Hex package manager. # -# description = "" -# licences = ["Apache-2.0"] -# repository = { type = "github", user = "", repo = "" } +description = "wisp_kv_sessions is a key-value session management library for [Wisp](https://gleam-wisp.github.io/wisp/), inspired by the Rust crate [tower sessions](https://docs.rs/tower-sessions/latest/tower_sessions/#). This library allows you to manage user sessions with ease, storing session data in a simple key-value store." +licences = ["Apache-2.0"] +repository = { type = "github", user = "MaxHill", repo = "wisp_kv_sessions" } # links = [{ title = "Website", href = "" }] # # For a full reference of all the available options, you can have a look at