Skip to content

Commit

Permalink
chore: improve release action
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Cunha committed Jul 29, 2024
1 parent 3e4da4a commit 8d173f8
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,26 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
ref: ${{ github.event.release.tag_name}}

- uses: erlef/setup-beam@v1
with:
otp-version: 27.0
elixir-version: 1.17

- uses: actions/cache@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-1.17-27.0-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-1.17-27.0-
- name: Hex publish
- name: Run mix deps.get
run: mix deps.get --only docs

- name: Run mix deps.compile
run: mix deps.compile

- name: Run mix compile
run: mix compile
env:
MIX_ENV: docs

- name: Run mix hex.publish
run: mix hex.publish --yes
env:
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
MIX_ENV: docs
4 changes: 3 additions & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Config

import_config "#{config_env()}.exs"
if config_env() == :test do
config :logger, backends: []
end
1 change: 0 additions & 1 deletion config/dev.exs

This file was deleted.

3 changes: 0 additions & 3 deletions config/test.exs

This file was deleted.

7 changes: 6 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ defmodule OpenFeature.MixProject do
start_permanent: Mix.env() == :prod,
test_paths: ["test/unit", "test/integration"],
deps: deps(),
preferred_cli_env: [
test: :test,
docs: :docs,
"hex.publish": :docs
],

# Docs
name: "OpenFeature",
Expand All @@ -33,7 +38,7 @@ defmodule OpenFeature.MixProject do
[
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.34", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.34", only: :docs, runtime: false},
{:mimic, "~> 1.9", only: :test}
]
end
Expand Down

0 comments on commit 8d173f8

Please sign in to comment.