diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c71e292..fb2ce2a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,17 +22,15 @@ permissions: id-token: write jobs: - versioning: name: Semantic Release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - persist-credentials: false - - uses: actions/setup-node@v3 - - run: cp .github/workflows/package.json . && npm install && npx semantic-release - + - uses: actions/checkout@v3 + with: + persist-credentials: false + - uses: actions/setup-node@v3 + - run: cp .github/workflows/package.json . && npm install && npx semantic-release rebase: name: Rebase Dev. Branch @@ -49,7 +47,7 @@ jobs: git fetch origin main git checkout main-dev git rebase origin/main - + - name: Push changes uses: CasperWA/push-protected@v2 with: @@ -58,48 +56,47 @@ jobs: unprotect_reviews: True force: True - pypi_publish: name: Publish Python runs-on: ubuntu-latest needs: versioning steps: - - uses: actions/checkout@v3 - with: - ref: 'main' - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.x' - - # Install dependencies: - # - build: for PyPi - # - anaconda-client: for Anaconda - # - urllib3: for Anaconda, as it is a dependency of anaconda-client - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build anaconda-client 'urllib3<2.0.0' - - - name: Build package - run: python -m build - - - name: Publish to PyPi - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} - - - name: Publish to Anaconda - env: - ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} - run: | - anaconda upload -u unum-cloud ./dist/*.tar.bz2 + - uses: actions/checkout@v3 + with: + ref: "main" + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: "3.11" + + # Install dependencies: + # - build: for PyPi + # - anaconda-client: for Anaconda + # - urllib3: for Anaconda, as it is a dependency of anaconda-client + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build anaconda-client 'urllib3<2.0.0' + + - name: Build package + run: python -m build + + - name: Publish to PyPi + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + + - name: Publish to Anaconda + env: + ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} + run: | + anaconda upload -u unum-cloud ./dist/*.tar.bz2 deploy_docs: name: Deploy Docs - environment: + environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-22.04 @@ -108,7 +105,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - ref: 'main' + ref: "main" - name: Setup GitHub Pages uses: actions/configure-pages@v2 - name: Install dependencies