Skip to content

Commit

Permalink
Merge pull request #254 from nimblehq/release/4.3.0
Browse files Browse the repository at this point in the history
Release - 4.3.0
  • Loading branch information
byhbt authored Aug 31, 2022
2 parents 25e5fad + 4c302e2 commit 0c83774
Show file tree
Hide file tree
Showing 69 changed files with 1,323 additions and 261 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Team Lead
* @andyduong1920
* @byhbt

# Team Members
* @bterone @byhbt @hanam1ni @junan @longnd @rosle @topnimble
* @andyduong1920 @bterone @hanam1ni @junan @longnd @rosle @topnimble @Nihisil @nvminhtue @liamstevens111

# Engineering Leads
CODEOWNERS @nimblehq/engineering-leads
12 changes: 6 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
https://github.com/nimblehq/elixir-templates/issues/??

## What happened
## What happened 👀

Describe the big picture of your changes here to communicate to the team why we should accept this pull request.
Provide a description of the **changes** this pull request brings to the codebase. Additionally, when the pull request is still being worked on, a checklist of the planned changes is welcome to track progress.

## Insight
## Insight 📝

Describe in details how to test the changes, which solution you tried but did not go with, referenced documentation is welcome as well.
Describe in detail why this solution is the most appropriate, which solution you tried but did not go with, and how to test the changes. References to relevant documentation are welcome as well.

## Proof Of Work
## Proof Of Work 📹

Show us the implementation: screenshots, gif, etc.
Show us the implementation: screenshots, GIFs, etc.
17 changes: 17 additions & 0 deletions .github/wiki/Release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
1. Set the `HEX_API_KEY` as a Github secret (skip this step if it has been done).

2. Visit the [Bump Version Github Action Workflow](https://github.com/nimblehq/elixir-templates/actions/workflows/bump_version.yml).

3. Choose `develop` branch.

4. Trigger the workflow with the next `<version number>`. That workflow will create a PR into the `develop` branch with the title `[Chore] Bump version to <version number>`.

![bump-version-workflow](assets/images/bump-version-workflow.png)

5. Merge the Bump version PR above into the `develop` branch.

6. Create the `release/<version number>` from the `develop` branch, pointing to the `main` branch.

7. Create a Release from the `main` branch.

8. Once the release is published, Github Action automatically publishes the template to [https://hex.pm/packages/nimble_template](https://hex.pm/packages/nimble_template).
9 changes: 9 additions & 0 deletions .github/wiki/Upgrade-Stack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
1. Visit the [Upgrade Stack Github Action Workflow](https://github.com/nimblehq/elixir-templates/actions/workflows/upgrade_stack.yml).

2. Choose `develop` branch.

3. Trigger the workflow with the new stack versions. That workflow will create a PR into the `develop` branch with the title `[Chore] Upgrade stack versions`.

![upgrade-stack-versions-workflow](assets/images/upgrade-stack-versions-workflow.png)

4. Merge the PR above into the `develop` branch.
7 changes: 7 additions & 0 deletions .github/wiki/_Sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@

- [[Docker]]
- [[Testing]]

## Release

- [[Release]]

## Upgrade stack (Elixir, Erlang, Alpine, Node version)
- [[Upgrade-Stack]]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions .github/workflows/apply_api_variant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
new_project_options: "--no-html --no-assets --no-live --module=SampleCustomModule --app=sample_custom_app"
variant: "api"

short_custom_name_api_project:
name: Test on a short custom name API project
uses: ./.github/workflows/reusable_phoenix_project.yml
Expand All @@ -37,15 +37,15 @@ jobs:
with:
new_project_options: "--no-live --module=SampleCustomModule --app=sample_custom_app"
variant: "api"

short_custom_name_web_project:
name: Test on a short custom name Web project
uses: ./.github/workflows/reusable_phoenix_project.yml
with:
new_project_options: "--no-live --module=Z --app=z"
variant: "api"


standard_live_project:
name: Test on a Standard Live project
uses: ./.github/workflows/reusable_phoenix_project.yml
Expand All @@ -59,7 +59,7 @@ jobs:
with:
new_project_options: "--module=SampleCustomModule --app=sample_custom_app"
variant: "api"

short_custom_name_live_project:
name: Test on a short custom name Live project
uses: ./.github/workflows/reusable_phoenix_project.yml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/apply_live_variant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
with:
new_project_options: ""
variant: "live"

long_custom_name_live_project:
name: Test on a long custom name Live project
uses: ./.github/workflows/reusable_phoenix_project.yml
with:
new_project_options: "--module=SampleCustomModule --app=sample_custom_app"
variant: "live"

short_custom_name_live_project:
name: Test on a short custom name Live project
uses: ./.github/workflows/reusable_phoenix_project.yml
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/apply_mix_variant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ jobs:
uses: ./.github/workflows/reusable_mix_project.yml
with:
new_project_options: ""

long_custom_name_mix_project:
name: Test on a long custom name Mix project
uses: ./.github/workflows/reusable_mix_project.yml
with:
new_project_options: "--module=SampleCustomModule --app=sample_custom_app"

short_custom_name_mix_project:
name: Test on a short custom name Mix project
uses: ./.github/workflows/reusable_mix_project.yml
with:
new_project_options: "--module=Z --app=z"

standard_mix_supervision_project:
name: Test on a Standard Supervision Mix project
uses: ./.github/workflows/reusable_mix_project.yml
with:
new_project_options: "--sup"

long_custom_name_mix_supervision_project:
name: Test on a long custom name Supervision Mix project
uses: ./.github/workflows/reusable_mix_project.yml
with:
new_project_options: "--sup --module=SampleCustomModule --app=sample_custom_app"

short_custom_name_mix_supervision_project:
name: Test on a short custom name Supervision Mix project
uses: ./.github/workflows/reusable_mix_project.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/apply_web_variant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
new_project_options: "--no-live --module=SampleCustomModule --app=sample_custom_app"
variant: "web"

short_custom_name_web_project:
name: Test on a short custom name Web project
uses: ./.github/workflows/reusable_phoenix_project.yml
Expand Down
94 changes: 94 additions & 0 deletions .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Bump Version

on:
workflow_dispatch:
inputs:
newVersion:
description: "New version"
required: true
type: string

env:
PHOENIX_VERSION: 1.6.11
MIX_ENV: test

jobs:
release_version_test:
name: Bump version
runs-on: ubuntu-latest

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Setup asdf
uses: asdf-vm/actions/setup@v1

- name: Cache asdf
uses: actions/cache@v3
with:
path: /home/runner/.asdf
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
restore-keys: ${{ runner.os }}-asdf-

- name: Install dependencies in .tool-versions
uses: asdf-vm/actions/install@v1

- name: Install rebar
run: mix local.rebar --force

- name: Install hex
run: mix local.hex --force

- name: Cache Elixir build
uses: actions/cache@v3
with:
path: |
_build
deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-

- name: Install Dependencies
run: mix deps.get

- name: Compile dependencies
run: mix compile --warnings-as-errors --all-warnings

- name: Install Phoenix ${{ env.PHOENIX_VERSION }}
run: make install_phoenix PHOENIX_VERSION=${{ env.PHOENIX_VERSION }}

- name: Bump version
run: mix nimble_template.bump_version ${{ github.event.inputs.newVersion }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
assignees: andyduong1920
token: ${{ secrets.WIKI_ACTION_TOKEN }}
commit-message: Bump version to ${{ github.event.inputs.newVersion }}
committer: Nimble Bot <[email protected]>
branch: chore/bump-version-to-${{ github.event.inputs.newVersion }}
delete-branch: true
title: '[Chore] Bump version to ${{ github.event.inputs.newVersion }}'
labels: |
type : chore
body: |
## What happened
Bump version to ${{ github.event.inputs.newVersion }}
## Insight
Automatically created by the Bump Version workflow.
## Proof Of Work
On the Files changed tab
18 changes: 6 additions & 12 deletions .github/workflows/publish_to_hex_pm.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
name: Publish to Hex package manager

on:
workflow_run:
workflows:
- Test template
branches:
- master
types:
- completed
workflow_dispatch:
release:
types: [published]

jobs:
publish:
name: Publish hex package

runs-on: ubuntu-latest

if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand All @@ -41,10 +35,10 @@ jobs:

- name: Install dependencies in .tool-versions
uses: asdf-vm/actions/install@v1

- name: Install rebar
run: mix local.rebar --force

- name: Install hex
run: mix local.hex --force

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/reusable_mix_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
env:
BASE_PROJECT_DIRECTORY: sample_project
MIX_ENV: test

jobs:
unit_test:
name: Unit test
Expand Down Expand Up @@ -39,13 +39,13 @@ jobs:

- name: Install dependencies in .tool-versions
uses: asdf-vm/actions/install@v1

- name: Install rebar
run: mix local.rebar --force

- name: Install hex
run: mix local.hex --force

- name: Create Mix project
run: make create_mix_project PROJECT_DIRECTORY=$BASE_PROJECT_DIRECTORY OPTIONS="${{ inputs.new_project_options }}"

Expand Down
Loading

0 comments on commit 0c83774

Please sign in to comment.