Skip to content

Commit

Permalink
build: consistent if clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjo committed Nov 10, 2023
1 parent dc765a3 commit 750146c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
- name: Rename jar
run: mv "build/debezium-offsetfile-conv-${{ inputs.version }}-runner.jar" "debezium-offsetfile-conv-${{ inputs.version }}.jar"
- name: Add jar to release
if: github.event_name == 'release' && ${{ inputs.upload }}
if: ${{ github.event_name == 'release' && inputs.upload }}
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
tag_name: ${{ inputs.version }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/determine_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ jobs:
- name: Install SVU
run: go install github.com/caarlos0/svu@00b733b056534c0fbdb316bbd37c023e7bb80905 #v1.11.0
- name: Get branch name (merge)
if: github.event_name != 'pull_request' && github.event_name != 'release'
if: ${{ github.event_name != 'pull_request' && github.event_name != 'release' }}
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
- name: Get branch name (pull request)
if: github.event_name == 'pull_request'
if: ${{ github.event_name == 'pull_request' }}
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
- name: Determine version (branch)
if: env.BRANCH_NAME != 'master'
if: ${{ env.BRANCH_NAME != 'master' }}
run: 'echo "PROJECT_VERSION=$(svu --pre-release ${{ env.BRANCH_NAME }}-alpha.$(git rev-list origin/master.. --count))" >> "$GITHUB_ENV"'
- name: Determine version (master)
if: github.event_name != 'release' && env.BRANCH_NAME == 'master'
if: ${{ github.event_name != 'release' && env.BRANCH_NAME == 'master' }}
run: 'echo "PROJECT_VERSION=$(svu)" >> "$GITHUB_ENV"'
- name: Determine version (release)
if: github.event_name == 'release'
if: ${{ github.event_name == 'release' }}
run: 'echo "PROJECT_VERSION=${{ github.event.release.tag_name }}" >> "$GITHUB_ENV"'
- run: 'echo "Determined version: $PROJECT_VERSION"'
- run: 'echo "PROJECT_VERSION=$PROJECT_VERSION" >> "$GITHUB_OUTPUT"'
Expand Down

0 comments on commit 750146c

Please sign in to comment.