Skip to content

Commit

Permalink
feat: adding publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Hill committed Sep 11, 2024
1 parent 2b08594 commit ed1f252
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 8 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: test
on:
push:
branches:
- master
- main
- develop
pull_request:

jobs:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions gleam.toml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit ed1f252

Please sign in to comment.