Skip to content

Commit

Permalink
fix: test for COMMIT_PUSH in true but PUBLISH_ARTIFACT in false, test…
Browse files Browse the repository at this point in the history
…ing skip CI
  • Loading branch information
bbatist-ban committed Feb 27, 2024
1 parent be33f99 commit 6625e3a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/template-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
otp-version: '25'

- name: setup semantic-release
run: npm install -g semantic-release @semantic-release/changelog @semantic-release/github -D
run: npm install -g semantic-release @semantic-release/changelog @semantic-release/github -D

- name: release
run: npx -p @semantic-release/changelog semantic-release
Expand All @@ -52,15 +52,14 @@ jobs:
if: ${{ env.DEBUG_MODE == 'true' }}
run: |
echo "RELEASE_VERSION=${{ env.RELEASE_VERSION }}"
echo "PUBLISH_ARTIFACT=${{ env.PUBLISH_ARTIFACT }}"
echo "CONDITION not EQ RELEASE_VERSION=${{ env.RELEASE_VERSION != '' }}"
echo "CONDITION EQ RELEASE_VERSION=${{ env.RELEASE_VERSION == '' }}"
echo "CONDITION TRUE PUBLISH_ARTIFACT=${{ env.PUBLISH_ARTIFACT == 'true' }}"
echo "CONDITION FALSE PUBLISH_ARTIFACT=${{ env.PUBLISH_ARTIFACT == 'false' }}"
echo "CONDITION RELEASE_VERSION != '';=${{ env.RELEASE_VERSION != '' }}"
echo "CONDITION PUBLISH_ARTIFACT == '';=${{ env.RELEASE_VERSION == '' }}"
echo "CONDITION PUBLISH_ARTIFACT == TRUE;=${{ env.PUBLISH_ARTIFACT == 'true' }}"
echo "CONDITION PUBLISH_ARTIFACT == FALSE;=${{ env.PUBLISH_ARTIFACT == 'false' }}"
echo "GITHUB_API_URL=${{ env.GITHUB_API_URL }}"
echo "PUBLISH_ARTIFACT=${{ env.PUBLISH_ARTIFACT }}"
echo "COMMIT_PUSH=${{ env.COMMIT_PUSH }}"
echo "DEBUG_MODE=${{ env.DEBUG_MODE }}"
echo "FILE_VERSION_TAG_EXISTS=${{ env.FILE_VERSION_TAG_EXISTS }}"
# deprecated
#- name: Set variables From VERSION-TAG.env
Expand All @@ -72,6 +71,7 @@ jobs:

- name: Set variables From git tag command
#if: ${{ hashFiles('VERSION-TAG.env') == '' }}
if: ${{ ( env.PUBLISH_ARTIFACT == 'true' ) || ( env.COMMIT_PUSH == 'true' ) }}
run: echo "RELEASE_VERSION=$(git tag | sort --version-sort | tail -n1)" >> $GITHUB_ENV

- name: Install Mix dependencies
Expand All @@ -98,7 +98,7 @@ jobs:
with:
github-token: ${{ env.GITHUB_TOKEN }}
push-branch: main
commit-message: '[skip release] Upgrade version to ${{ env.RELEASE_VERSION }}'
commit-message: '[skip release] [skip ci] Upgrade version to ${{ env.RELEASE_VERSION }}'
force-add: "true"
files: Elixir/Konex/mix.exs
name: Release Bot
Expand Down

0 comments on commit 6625e3a

Please sign in to comment.