Merge branch 'master' of https://github.com/EBI-Metabolights/metaboli… #25
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: Build application | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Setup Poetry | |
uses: Gr1N/setup-poetry@v9 | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Test with pytest | |
run: | | |
poetry run pytest | |
- name: Semantic release | |
run: | | |
GH_TOKEN="${{ secrets.GITHUB_TOKEN }}" poetry run semantic-release version | |
- name: Build and publish to pypi | |
uses: JRubics/poetry-publish@v2.0 | |
with: | |
pypi_token: ${{ secrets.PYPI_TOKEN }} |