Skip to content

Commit

Permalink
/deploy sit
Browse files Browse the repository at this point in the history
  • Loading branch information
sliu008 committed Jan 15, 2025
1 parent a39c935 commit 0544dcc
Show file tree
Hide file tree
Showing 3 changed files with 191 additions and 458 deletions.
50 changes: 14 additions & 36 deletions .github/workflows/.release-created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,23 @@ jobs:
- uses: actions/checkout@v4
with:
ref: 'refs/heads/develop'
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Poetry
uses: abatilo/actions-poetry@v2.0.0
uses: abatilo/actions-poetry@v3
with:
poetry-version: 1.3.2
poetry-version: 1.8.5

- name: Bump minor version
env:
COMMIT_VERSION: ${{ github.ref }}
run: |
# only update the develop branch if were making #.#.0 release
# Get the branch name from the GITHUB_REF environment variable
branch_name=${GITHUB_REF#refs/heads/}
# Extract the last number in the branch name using a regular expression
if [[ $branch_name =~ /([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
first_number=${BASH_REMATCH[1]}
middle_number=${BASH_REMATCH[2]}
last_number=${BASH_REMATCH[3]}
# Increment the middle number by 1
incremented_middle_number=$((middle_number + 1))
# Check if the last number is '0'
if [ "$last_number" == "0" ]; then
update_version=$first_number.$incremented_middle_number.$last_number-alpha.1
poetry version $update_version
echo "software_version=$update_version" >> $GITHUB_ENV
git config --global user.name 'podaac-tig bot'
git config --global user.email '[email protected]'
git commit -am "/version ${{ env.software_version }}"
git push
fi
fi
poetry version ${GITHUB_REF#refs/heads/release/}
poetry version preminor
echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
- name: Commit Version Bump
run: |
git config --global user.name 'podaac-tig bot'
git config --global user.email '[email protected]'
git commit -am "/version ${{ env.software_version }}"
git push
Loading

0 comments on commit 0544dcc

Please sign in to comment.