Bump version: 1.1.2 → 1.1.3 #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install dev dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements_dev.txt | |
- name: Lint | |
run: | | |
make lint | |
test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install all dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
python -m pip install -r requirements_dev.txt | |
- name: Test | |
run: | | |
make test | |
publish: | |
runs-on: ubuntu-22.04 | |
needs: [lint, test] | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install dev dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools | |
python -m pip install -r requirements_dev.txt | |
- name: Package | |
run: | | |
make dist | |
# - name: Publish to Test PyPI | |
# uses: pypa/gh-action-pypi-publish@master | |
# with: | |
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
# repository_url: https://test.pypi.org/legacy/ | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
deploy: | |
permissions: | |
contents: "read" | |
id-token: "write" | |
runs-on: ubuntu-latest | |
needs: [publish] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Authenticate with Google | |
uses: "google-github-actions/auth@v2" | |
with: | |
workload_identity_provider: "projects/39603749578/locations/global/workloadIdentityPools/github-actions/providers/github-actions" | |
service_account: "[email protected]" | |
- name: Deploy server code to appengine | |
uses: "google-github-actions/deploy-appengine@v2" | |
with: | |
working_directory: "server" | |
project_id: "rcv-tabulator" | |
env_vars: |- | |
SECRET_KEY=${{ secrets.SECRET_KEY }} |