Skip to content

Commit

Permalink
Update branch name handling in GitHub workflow
Browse files Browse the repository at this point in the history
This update modifies the GitHub packages workflow. 'issue/*' and 'bug/*' branches were removed from the workflow trigger, and branch name handling logic updated. Now, if the branch name is 'main', the version is labeled as 'preview'. Otherwise, the branch name is used.
  • Loading branch information
sfmskywalker committed Feb 14, 2024
1 parent ceee982 commit 68b2657
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches:
- main
- feature/*
- issue/*
- bug/*
release:
types: [ prereleased, published ]
env:
Expand Down Expand Up @@ -36,7 +34,12 @@ jobs:
TAG_NAME=${TAG_NAME#refs/tags/} # remove the refs/tags/ prefix
echo "VERSION=${TAG_NAME}" >> $GITHUB_ENV
else
echo "VERSION=3.1.0-${BRANCH_NAME}.${{github.run_number}}" >> $GITHUB_ENV
# if branch name is main, use preview as the version. Otherwise, use the branch name.
if [[ "${BRANCH_NAME}" == "main" ]]; then
echo "VERSION=3.1.0-preview.${{github.run_number}}" >> $GITHUB_ENV
else
echo "VERSION=3.1.0-${BRANCH_NAME}.${{github.run_number}}" >> $GITHUB_ENV
fi
fi
- name: Compile+Test+Pack
run: ./build.sh Compile+Test+Pack --version ${VERSION}
Expand Down

0 comments on commit 68b2657

Please sign in to comment.