Skip to content

Commit 69f9a8c

Browse files
committed
Preparing MSAL Python EX 1.1.0
1 parent b15f292 commit 69f9a8c

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

.github/workflows/python-package.yml

+15-4
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,16 @@ jobs:
8686
8787
cd:
8888
needs: ci
89-
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/master')
89+
# Note: github.event.pull_request.draft == false WON'T WORK in "if" statement,
90+
# because the triggered event is a push, not a pull_request.
91+
# This means each commit will trigger a release on TestPyPI.
92+
# Those releases will only succeed when each push has a new version number: a1, a2, a3, etc.
93+
if: |
94+
github.event_name == 'push' &&
95+
(
96+
startsWith(github.ref, 'refs/tags') ||
97+
startsWith(github.ref, 'refs/heads/release-')
98+
)
9099
runs-on: ubuntu-latest
91100
steps:
92101
- uses: actions/checkout@v4
@@ -98,14 +107,16 @@ jobs:
98107
run: |
99108
python -m pip install build --user
100109
python -m build --sdist --wheel --outdir dist/ .
101-
- name: Publish to TestPyPI
110+
- name: |
111+
Publish to TestPyPI when pushing to release-* branch.
112+
You better test with a1, a2, b1, b2 releases first.
102113
uses: pypa/[email protected]
103-
if: github.ref == 'refs/heads/master'
114+
if: startsWith(github.ref, 'refs/heads/release-')
104115
with:
105116
user: __token__
106117
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
107118
repository_url: https://test.pypi.org/legacy/
108-
- name: Publish to PyPI
119+
- name: Publish to PyPI when tagged
109120
if: startsWith(github.ref, 'refs/tags')
110121
uses: pypa/[email protected]
111122
with:

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# TODO: Can this Dockerfile use multi-stage build?
22
# Final size 690MB. (It would be 1.16 GB if started with python:3 as base)
3-
FROM python:3-slim
3+
FROM python:3.12-slim
44

55
# Install Generic PyGObject (sans GTK)
66
#The following somehow won't work:
@@ -22,7 +22,7 @@ RUN apt-get install -y \
2222
RUN pip install "pytest>=6,<7"
2323

2424
# Install MSAL Extensions. Upgrade the pinned version number to trigger a new image build.
25-
RUN pip install "msal-extensions==0.3"
25+
RUN pip install "msal-extensions==1.1"
2626

2727
# This setup is inspired from https://github.com/jaraco/keyring#using-keyring-on-headless-linux-systems-in-a-docker-container
2828
ENTRYPOINT ["dbus-run-session", "--"]

msal_extensions/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Provides auxiliary functionality to the `msal` package."""
2-
__version__ = "1.0.0"
2+
__version__ = "1.1.0"
33

44
from .persistence import (
55
FilePersistence,

0 commit comments

Comments
 (0)