diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml new file mode 100644 index 00000000..6d289cd4 --- /dev/null +++ b/.github/workflows/patch.yml @@ -0,0 +1,93 @@ +name: deploy-patch + +on: +# Currently this workflow only runs when triggered manually. Perhaps we can set it up to run when a tag is pushed. Or when a release is made. Or that it could create a release, on a release it can create a tag? + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + test: + name: Run tests + strategy: + fail-fast: false + matrix: + python-version: ['3.8', '3.9', '3.10'] + poetry-version: ['1.1.13'] + os: [ubuntu-latest, windows-latest] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install poetry ${{ matrix.poetry-version }} + run: | + python -m ensurepip + python -m pip install --upgrade pip + python -m pip install poetry==${{ matrix.poetry-version }} + + - name: Install dependencies + shell: bash + run: | + python -m poetry install + python -m poetry run python scripts/fetch_core.py + python -m poetry run python scripts/zip_templates.py + + - name: Test with pytest + run: | + python -m poetry run pytest -v + + deploy: + needs: test + name: Deploy to pypi + runs-on: ubuntu-latest + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + # Sets up python3 + - uses: actions/setup-python@v2 + with: + python-version: 3.8.5 + + # Setup poetry + - name: Install poetry + run: | + ensurepip + pip install --upgrade pip + pip install poetry + + - name: Install dependencies + shell: bash + run: poetry install + + - name: Build package + run: poetry run python scripts/build_package.py + + - name: Publish + env: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + run: | + poetry config pypi-token.pypi $PYPI_TOKEN + poetry publish --build + + - name: Update version + run: poetry version patch + + - name: setup git config + run: | + # setup the username and email. + git config user.name "GitHub Actions Bot" + git config user.email "<>" + + - name: commit + run: | + # Stage the file, commit and push + git add pyproject.toml + git commit -m "bump version to next patch level for nightlies" + git push origin main \ No newline at end of file diff --git a/pretext/__init__.py b/pretext/__init__.py index ee9f313c..c8315549 100644 --- a/pretext/__init__.py +++ b/pretext/__init__.py @@ -18,7 +18,7 @@ VERSION = get_version('pretext', Path(__file__).parent.parent) -CORE_COMMIT = "ebd94b8ed16f32563c085f189c495bc6bc54324d" +CORE_COMMIT = "030d676d9c2c8799347df1f6c0014f95cecd44f0" def activate():