Skip to content

Commit

Permalink
Merge pull request #6 from straw-hat-team/upgrade-elixir-setup
Browse files Browse the repository at this point in the history
chore: upgrade elixir
  • Loading branch information
yordis authored Nov 29, 2022
2 parents 83b047c + a87b279 commit cf1dacb
Show file tree
Hide file tree
Showing 15 changed files with 52 additions and 13 deletions.
2 changes: 1 addition & 1 deletion elixir/compilation-warnings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ Compiles the code treating warnings as errors.
with:
elixir-version: '1.11' # optional, fallback to use .tool-versions
otp-version: '22.3' # optional, fallback to use .tool-versions
version-type: 'loose' # optional, fallback to strict
```
7 changes: 6 additions & 1 deletion elixir/compilation-warnings/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ inputs:
otp-version:
description: The Erlang version. It fallback to .tool-versions if not specified
required: false
version-type:
description: The versioning type check, either strict or loose
required: false
default: strict

runs:
using: composite
steps:
- name: Setup Elixir
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.3.0
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.6.1
with:
elixir-version: ${{ inputs.elixir-version }}
otp-version: ${{ inputs.otp-version }}
version-type: ${{ inputs.version-type }}

- name: Run compilation
shell: sh
Expand Down
1 change: 1 addition & 0 deletions elixir/credo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Runs [Dialyxir](https://github.com/jeremyjh/dialyxir) in your project.
with:
elixir-version: '1.11' # optional, fallback to use .tool-versions
otp-version: '22.3' # optional, fallback to use .tool-versions
version-type: 'loose' # optional, fallback to strict
```

### Fix credo could not be found error
Expand Down
7 changes: 6 additions & 1 deletion elixir/credo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ inputs:
otp-version:
description: The Erlang version. It fallback to .tool-versions if not specified
required: false
version-type:
description: The versioning type check, either strict or loose
required: false
default: strict

runs:
using: composite
steps:
- name: Setup Elixir
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.3.0
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.6.1
with:
elixir-version: ${{ inputs.elixir-version }}
otp-version: ${{ inputs.otp-version }}
version-type: ${{ inputs.version-type }}

- name: Run Linter
shell: sh
Expand Down
1 change: 1 addition & 0 deletions elixir/dialyzer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Runs [Dialyxir](https://github.com/jeremyjh/dialyxir) in your project.
with:
elixir-version: '1.11' # optional, fallback to use .tool-versions
otp-version: '22.3' # optional, fallback to use .tool-versions
version-type: 'loose' # optional, fallback to strict
```
### Setup Dialyxir in your project
Expand Down
7 changes: 6 additions & 1 deletion elixir/dialyzer/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ inputs:
otp-version:
description: The Erlang version. It fallback to .tool-versions if not specified
required: false
version-type:
description: The versioning type check, either strict or loose
required: false
default: strict

runs:
using: composite
steps:
- name: Setup Elixir
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.3.0
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.6.1
with:
elixir-version: ${{ inputs.elixir-version }}
otp-version: ${{ inputs.otp-version }}
version-type: ${{ inputs.version-type }}

- name: Restore PLT cache
uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion elixir/format/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ Runs the formatter check in your Elixir project.
with:
elixir-version: '1.11' # optional, fallback to use .tool-versions
otp-version: '22.3' # optional, fallback to use .tool-versions
version-type: 'loose' # optional, fallback to strict
```
7 changes: 6 additions & 1 deletion elixir/format/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ inputs:
otp-version:
description: The Erlang version. It fallback to .tool-versions if not specified
required: false
version-type:
description: The versioning type check, either strict or loose
required: false
default: strict

runs:
using: composite
steps:
- name: Setup Elixir
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.3.0
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.6.1
with:
elixir-version: ${{ inputs.elixir-version }}
otp-version: ${{ inputs.otp-version }}
version-type: ${{ inputs.version-type }}

- name: Run Formatter
shell: sh
Expand Down
1 change: 1 addition & 0 deletions elixir/publish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ Publish an Elixir package to Hex.pm.
with:
elixir-version: '1.11' # optional, fallback to use .tool-versions
otp-version: '22.3' # optional, fallback to use .tool-versions
version-type: 'loose' # optional, fallback to strict
hex-api-key: ${{ secrets.HEX_API_KEY }} # (see step 2)
```
7 changes: 6 additions & 1 deletion elixir/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
otp-version:
description: The Erlang version. It fallback to .tool-versions if not specified
required: false
version-type:
description: The versioning type check, either strict or loose
required: false
default: strict
hex-api-key:
description: The hex.pm API key
required: true
Expand All @@ -17,10 +21,11 @@ runs:
using: composite
steps:
- name: Setup Elixir
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.3.0
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.6.1
with:
elixir-version: ${{ inputs.elixir-version }}
otp-version: ${{ inputs.otp-version }}
version-type: ${{ inputs.version-type }}
- name: Run Hex Publish
shell: sh
run: mix hex.publish --yes
Expand Down
6 changes: 3 additions & 3 deletions elixir/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ runs:
steps:
- name: Reading Elixir version from .tool-versions
id: tool-versions-elixir
uses: straw-hat-team/github-actions-workflows/asdf/get-version@v1.3.0
uses: straw-hat-team/github-actions-workflows/asdf/get-version@v1.6.1
with:
plugin-name: elixir
if: ${{ ! inputs.elixir-version }}

- name: Reading Erlang version from .tool-versions
id: tool-versions-erlang
uses: straw-hat-team/github-actions-workflows/asdf/get-version@v1.3.0
uses: straw-hat-team/github-actions-workflows/asdf/get-version@v1.6.1
with:
plugin-name: erlang
if: ${{ ! inputs.otp-version }}

- name: Set up Elixir
uses: erlef/setup-beam@v1
uses: erlef/setup-beam@v1.15.0
with:
elixir-version: ${{ inputs.elixir-version || steps.tool-versions-elixir.outputs.plugin-version }}
otp-version: ${{ inputs.otp-version || steps.tool-versions-erlang.outputs.plugin-version }}
Expand Down
2 changes: 1 addition & 1 deletion elixir/test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ Run the Elixir tests.
with:
elixir-version: '1.11' # optional, fallback to use .tool-versions
otp-version: '22.3' # optional, fallback to use .tool-versions
version-type: 'loose' # optional, fallback to strict
```
7 changes: 6 additions & 1 deletion elixir/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ inputs:
otp-version:
description: The Erlang version. It fallback to .tool-versions if not specified
required: false
version-type:
description: The versioning type check, either strict or loose
required: false
default: strict

runs:
using: composite
steps:
- name: Setup Elixir
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.3.0
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.6.1
with:
elixir-version: ${{ inputs.elixir-version }}
otp-version: ${{ inputs.otp-version }}
version-type: ${{ inputs.version-type }}

- name: Run tests
shell: sh
Expand Down
1 change: 1 addition & 0 deletions elixir/umbrella-publish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ event.
with:
elixir-version: '1.11' # optional, fallback to use .tool-versions
otp-version: '22.3' # optional, fallback to use .tool-versions
version-type: 'loose' # optional, fallback to strict
hex-api-key: ${{ secrets.HEX_API_KEY }} # (see step 2)
ref-name: ${{ github.ref_name }} # the GitHub Release Tag Name with the format of "[package name]@v[version]"
```
Expand Down
7 changes: 6 additions & 1 deletion elixir/umbrella-publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
otp-version:
description: The Erlang version. It fallback to .tool-versions if not specified
required: false
version-type:
description: The versioning type check, either strict or loose
required: false
default: strict
hex-api-key:
description: The hex.pm API key
required: true
Expand All @@ -24,10 +28,11 @@ runs:
using: composite
steps:
- name: Setup Elixir
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.3.0
uses: straw-hat-team/github-actions-workflows/elixir/setup@v1.6.1
with:
elixir-version: ${{ inputs.elixir-version }}
otp-version: ${{ inputs.otp-version }}
version-type: ${{ inputs.version-type }}
- name: Run Hex Publish
env:
HEX_API_KEY: ${{ inputs.hex-api-key }}
Expand Down

0 comments on commit cf1dacb

Please sign in to comment.