Merge pull request #13 from python-dev-tools/publish_release #9
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
# This workflow will install Python dependencies, build the package, and run safety checks | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Package | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
merge_group: | |
types: [checks_requested] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
permissions: {} | |
jobs: | |
package_and_vulenrability: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install | |
- name: Package Check | |
run: | | |
poetry build | |
- name: Run Safety Check | |
# Remove below ignore line once the vulnerability is fixed | |
run: poetry run poetry audit --ignore-package=jinja2 |