diff --git a/.github/workflows/deploy-dev-release.yml b/.github/workflows/deploy-dev-release.yml new file mode 100644 index 0000000..9d1a448 --- /dev/null +++ b/.github/workflows/deploy-dev-release.yml @@ -0,0 +1,29 @@ +--- +name: Deploy Pre-Release Artifacts + +on: + push: + branches: + - develop + workflow_dispatch: + +defaults: + run: + shell: bash + +env: + LANG: en_US.utf-8 + LC_ALL: en_US.utf-8 + PYTHON_VERSION: '3.10' + +jobs: + call-deploy-release: + permissions: + contents: write # To push a branch + pull-requests: write # To create a PR from that branch + + uses: GRIDAPPSD/.github/.github/workflows/deploy-dev-release.yml@main + secrets: + git-token: ${{ secrets.GITHUB_TOKEN }} + pypi-token: ${{ secrets.PYPI_TOKEN }} + diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml deleted file mode 100644 index 3c9bd06..0000000 --- a/.github/workflows/dev-release.yml +++ /dev/null @@ -1,149 +0,0 @@ ---- -name: Deploy Pre-Release Artifacts - -on: - push: - branches: - - develop - -defaults: - run: - shell: bash - -env: - LANG: en_US.utf-8 - LC_ALL: en_US.utf-8 - RUNS_ON: ubuntu-latest - -jobs: - find-version-and-release: - runs-on: ubuntu-latest - steps: - - name: Getting next version - id: find-version - uses: craig8/versioner@main - - - name: Create build artifacts - run: | - poetry build -vvv - - - name: Do github release - uses: ncipollo/release-action@v1 - if: ${{ github.repository_owner }} == "GRIDAPPSD" - with: - artifacts: "dist/*.gz,dist/*.whl" - artifactErrorsFailBuild: true - generateReleaseNotes: true - commit: ${{ github.ref }} - prerelease: true - tag: "v${{ steps.find-version.outputs.new-version }}" - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish pre-release to pypi - if: github.repository_owner == 'GRIDAPPSD' - run: | - poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} - poetry publish - -# bump_version: -# runs-on: ubuntu-latest -# 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!" -# - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - -# #---------------------------------------------- -# # check-out repo and set-up python -# #---------------------------------------------- -# - name: Checkout code -# uses: actions/checkout@v2 -# with: -# fetch-depth: 0 - -# - name: Set up Python ${{ env.PYTHON_VERSION }} -# id: setup-python -# uses: actions/setup-python@v2 -# with: -# python-version: ${{ env.PYTHON_VERSION }} - -# #---------------------------------------------- -# # ----- install & configure poetry ----- -# #---------------------------------------------- -# - name: Install Poetry -# uses: snok/install-poetry@v1 -# with: -# version: latest -# 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/cache@v2.1.7 -# 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 - -# #---------------------------------------------- -# # bump version number for patch -# #---------------------------------------------- -# - name: Bump Version -# run: | - -# # $versionarr now holds the current version of the tag. -# IFS='.' read -ra versionarr <<< $(poetry version --short) - -# today=$(date +'%Y%m%d%H%M%S') - -# new_version="${versionarr[0]}.${versionarr[1]}.$today" -# poetry version $new_version -# poetry version prerelease - -# NEW_TAG="v$(poetry version --short)" -# echo "NEW_TAG=$(echo ${NEW_TAG})" >> $GITHUB_ENV - -# # while [[ ! $(git tag -l "$tag_in_question") = '' ]] -# # do -# # poetry version prerelease -# # tag_in_question="v$(poetry version --short)" -# # loop - -# #--------------------------------------------------------------- -# # create build artifacts to be included as part of release -# #--------------------------------------------------------------- -# - name: Create build artifacts -# run: | -# poetry build -vvv - -# - uses: ncipollo/release-action@v1 -# with: -# artifacts: "dist/*.gz,dist/*.whl" -# artifactErrorsFailBuild: true -# generateReleaseNotes: true -# commit: ${{ github.ref }} -# prerelease: true -# tag: ${{ env.NEW_TAG }} -# token: ${{ secrets.GITHUB_TOKEN }} - -# - name: Publish pre-release to pypi -# if: github.repository_owner == 'GRIDAPPSD' -# run: | -# poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }} -# poetry publish diff --git a/.github/workflows/dispatch-pypi.yml b/.github/workflows/dispatch-pypi.yml deleted file mode 100644 index c0d3209..0000000 --- a/.github/workflows/dispatch-pypi.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -# Documentation located -# https://github.com/marketplace/actions/publish-python-poetry-package -name: Dispatch to PyPi - -on: - workflow_dispatch: - -defaults: - run: - shell: bash - -env: - LANG: en_US.utf-8 - LC_ALL: en_US.utf-8 - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - -jobs: - - publish_to_pypi: - - runs-on: ubuntu-latest - - 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!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - - name: Checkout code - uses: actions/checkout@v2 - - - name: Build and publish to pypi - uses: JRubics/poetry-publish@v1.7 - with: - # These are only needed when using test.pypi - #repository_name: testpypi - #repository_url: https://test.pypi.org/legacy/ - pypi_token: ${{ secrets.PYPI_TOKEN }} - ignore_dev_requirements: "yes" \ No newline at end of file diff --git a/.github/workflows/release_wheel.yml b/.github/workflows/release_wheel.yml deleted file mode 100644 index c6ac80a..0000000 --- a/.github/workflows/release_wheel.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# Documentation located -# https://github.com/marketplace/actions/publish-python-poetry-package -name: Publish Python package -on: - push: - tags: - - 'v*.*.*' -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Build and publish to pypi - uses: JRubics/poetry-publish@v1.7 - with: - # These are only needed when using test.pypi - #repository_name: testpypi - #repository_url: https://test.pypi.org/legacy/ - pypi_token: ${{ secrets.PYPI_TOKEN }} - ignore_dev_requirements: "yes" \ No newline at end of file diff --git a/README.md b/README.md index 7305a71..635e419 100644 --- a/README.md +++ b/README.md @@ -324,6 +324,5 @@ def test_gridappsd_status(gridappsd_client): gappsd.set_service_status("Foo") assert gappsd.get_service_status() == ProcessStatusEnum.COMPLETE.value assert gappsd.get_application_status() == ProcessStatusEnum.COMPLETE.value - ```