-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
268be3a
commit e4923c0
Showing
1 changed file
with
38 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ permissions: | |
id-token: write | ||
|
||
jobs: | ||
release: | ||
Set Up: | ||
environment: ACTIONS_ENV | ||
runs-on: ubuntu-latest | ||
|
||
|
@@ -41,12 +41,19 @@ jobs: | |
with: | ||
elixir-version: '1.14.3' | ||
otp-version: '25' | ||
- name: setup semantic-release | ||
|
||
- name: Setup semantic-release | ||
if: ${{ env.SKIP_RELEASE == 'false' }} | ||
run: npm install -g semantic-release @semantic-release/changelog @semantic-release/github conventional-changelog-eslint conventional-changelog-conventionalcommits conventional-changelog-angular -D | ||
|
||
- name: release | ||
|
||
Generate Release: | ||
environment: ACTIONS_ENV | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Generate Release | ||
if: ${{ env.SKIP_RELEASE == 'false' }} | ||
run: npx -p conventional-changelog-eslint -p conventional-changelog-conventionalcommits -p @semantic-release/changelog semantic-release | ||
|
||
|
@@ -71,24 +78,21 @@ jobs: | |
echo "$VER" | ||
echo "RELEASE_VERSION=$(git tag | sort --version-sort | tail -n1 | tr -d 'v')" >> $GITHUB_ENV | ||
- name: Install Mix dependencies | ||
if: ${{ env.SKIP_RELEASE == 'false' && env.PUBLISH_ARTIFACT == 'true' }} | ||
run: mix deps.get && mix deps.compile | ||
working-directory: Elixir/Konex | ||
|
||
- name: Run Mix tests | ||
if: ${{ env.SKIP_RELEASE == 'false' && env.PUBLISH_ARTIFACT == 'true' }} | ||
run: mix test | ||
working-directory: Elixir/Konex | ||
Commit and Push: | ||
environment: ACTIONS_ENV | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# testing, working but we need to prevent next run. | ||
# adding [skip ci] to commit comment we can skip the new CI run onf the workflow | ||
# not working on multiple commits from pull request | ||
- name: Upgrade mix.exs | ||
if: ${{ env.SKIP_RELEASE == 'false' && env.COMMIT_PUSH == 'true' }} | ||
run: sed -i 's/@version \".*\"/@version "${{ env.RELEASE_VERSION }}"/g' mix.exs | ||
working-directory: Elixir/Konex | ||
|
||
# testing, working but we need to prevent next run. | ||
# adding [skip ci] to commit comment we can skip the new CI run onf the workflow | ||
# not working on multiple commits from pull request | ||
- name: Commit And Push version | ||
if: ${{ env.SKIP_RELEASE == 'false' && env.COMMIT_PUSH == 'true' }} | ||
uses: github-actions-x/[email protected] | ||
|
@@ -101,6 +105,23 @@ jobs: | |
name: Release Bot | ||
email: [email protected] | ||
|
||
Publish: | ||
environment: ACTIONS_ENV | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Mix dependencies | ||
if: ${{ env.SKIP_RELEASE == 'false' && env.PUBLISH_ARTIFACT == 'true' }} | ||
run: mix deps.get && mix deps.compile | ||
working-directory: Elixir/Konex | ||
|
||
- name: Run Mix tests | ||
if: ${{ env.SKIP_RELEASE == 'false' && env.PUBLISH_ARTIFACT == 'true' }} | ||
run: mix test | ||
working-directory: Elixir/Konex | ||
|
||
- name: Publish to HEX | ||
if: ${{ env.SKIP_RELEASE == 'false' && env.PUBLISH_ARTIFACT == 'true' }} | ||
run: mix hex.publish --replace --yes | ||
|