Skip to content

Commit

Permalink
Merge branch 'releases/v0.4.1rc0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Deploy Release Github Action committed May 11, 2023
2 parents 20679ee + 59fbfc9 commit 4305cd5
Show file tree
Hide file tree
Showing 15 changed files with 848 additions and 328 deletions.
25 changes: 0 additions & 25 deletions .github/release.yml

This file was deleted.

116 changes: 0 additions & 116 deletions .github/workflows/create-release.yml

This file was deleted.

69 changes: 42 additions & 27 deletions .github/workflows/deploy-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ defaults:
env:
LANG: en_US.utf-8
LC_ALL: en_US.utf-8
PYTHON_VERSION: '3.8'
RUNS_ON: ubuntu-20.04
PYTHON_VERSION: '3.10'

jobs:

bump_version:
runs-on: ubuntu-20.04
if: github.ref_name != 'main'
runs-on: ubuntu-22.04
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
Expand All @@ -29,7 +29,7 @@ jobs:
# check-out repo and set-up python
#----------------------------------------------
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3.5.2
with:
fetch-depth: 0

Expand All @@ -43,41 +43,58 @@ jobs:
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
uses: snok/install-poetry@v1.3.3
with:
version: 1.2.0b2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/[email protected]
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root

#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: |
poetry install --no-interaction --without dev
poetry install --no-interaction
#----------------------------------------------
# bump version number for patch
#----------------------------------------------
- name: Bump Version
run: |
# current_tag is the last tagged relese in the repository. From there
# we need to remove the v from the begining of the tag.
# current_tag is the last tagged release in the repository. From there
# we need to remove the v from the beginning of the tag.
echo "Bump rule is prerelease"
if ! $(git tag -l "v*" = ''); then
# uses -V which is version sort to keep it monotonically increasing.
current_tag=$(git tag -l "v*" | sort --reverse -V |sed -n 1p)
current_tag=$(git tag -l "v*" | grep --invert-match '-' | sort --reverse -V | sed -n 1p)
echo "current git tag is ${current_tag}"
current_tag=${current_tag#?}
# current_tag is now the version we want to set our poetry version so
# that we can bump the version
poetry version ${current_tag}
poetry version prerelease --no-interaction
else
current_tag=v0.3.0
# very first release. start with inputs.first-release-version
echo "First release. Setting tag as v0.0.1rc0"
current_tag=v0.0.1rc0
poetry version ${current_tag}
fi
current_tag=${current_tag#?}
# current_tag is now the version we want to set our poetry version so
# that we can bump the version
poetry version ${current_tag}
poetry version prerelease --no-interaction
NEW_TAG=v$(poetry version --short)
# Finally because we want to be able to use the variable in later
Expand All @@ -91,7 +108,7 @@ jobs:
run: |
poetry build -vvv
- uses: ncipollo/release-action@v1
- uses: ncipollo/release-action@v1.12.0
with:
artifacts: "dist/*.gz,dist/*.whl"
artifactErrorsFailBuild: true
Expand All @@ -102,9 +119,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish pre-release to pypi
if: github.repository == 'eclipse-volttron/volttron-testing'
if: github.repository_owner == 'eclipse-volttron'
run: |
# poetry config repositories.test-pypi https://test.pypi.org/legacy/
# poetry config pypi-token.test-pypi ${{ secrets.TEST_PYPI_TOKEN }}
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish # -r test-pypi
poetry publish
39 changes: 0 additions & 39 deletions .github/workflows/dispatch-to-pypi.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/downstream-update-trigger.yml

This file was deleted.

Loading

0 comments on commit 4305cd5

Please sign in to comment.