Skip to content

Commit ed1f252

Browse files
author
Max Hill
committed
feat: adding publish workflow
1 parent 2b08594 commit ed1f252

File tree

4 files changed

+56
-8
lines changed

4 files changed

+56
-8
lines changed

.github/workflows/publish.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: erlef/setup-beam@v1
15+
with:
16+
otp-version: "26.0.2"
17+
gleam-version: "1.4.1"
18+
rebar3-version: "3"
19+
# elixir-version: "1.15.4"
20+
- run: gleam deps download
21+
- run: gleam test
22+
- run: gleam format --check src test
23+
24+
deploy:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: erlef/setup-beam@v1
29+
with:
30+
otp-version: "26.0.2"
31+
gleam-version: "1.4.1"
32+
rebar3-version: "3"
33+
# elixir-version: "1.15.4"
34+
35+
- name: Load secret
36+
uses: 1password/load-secrets-action@v2
37+
with:
38+
# Export loaded secrets as environment variables
39+
export-env: true
40+
env:
41+
OP_SERVICE_ACCOUNT_TOKEN: "${{secrets.OP_SERVICE_ACCOUNT_TOKEN}}"
42+
HEXPM_USER: "op://wisp-kv-sessions/Hex/username"
43+
HEXPM_PASS: "op://wisp-kv-sessions/Hex/password"
44+
45+
46+
- name: Print masked secret
47+
run: 'echo "USER: $HEXPM_USER", "PW: $HEXPM_PASS"'
48+
49+
- run: gleam publish --yes

.github/workflows/test.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: test
33
on:
44
push:
55
branches:
6-
- master
7-
- main
6+
- develop
87
pull_request:
98

109
jobs:

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# wisp_kv_sessions
22

3-
[![Package Version](https://img.shields.io/hexpm/v/max_wisp_sessions)](https://hex.pm/packages/max_wisp_sessions)
4-
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/max_wisp_sessions/)
3+
[![Package Version](https://img.shields.io/hexpm/v/wisp_kv_sessions)](https://hex.pm/packages/wisp_kv_sessions)
4+
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/wisp_kv_sessions/)
55

66

77
# Overview

gleam.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name = "wisp_kv_sessions"
2-
version = "1.0.0"
2+
version = "0.0.1"
33

44
# Fill out these fields if you intend to generate HTML documentation or publish
55
# your project to the Hex package manager.
66
#
7-
# description = ""
8-
# licences = ["Apache-2.0"]
9-
# repository = { type = "github", user = "", repo = "" }
7+
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."
8+
licences = ["Apache-2.0"]
9+
repository = { type = "github", user = "MaxHill", repo = "wisp_kv_sessions" }
1010
# links = [{ title = "Website", href = "" }]
1111
#
1212
# For a full reference of all the available options, you can have a look at

0 commit comments

Comments
 (0)