-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (33 loc) · 1.05 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Test, Build, and Publish
on:
workflow_dispatch:
release:
types: [ published ]
permissions:
contents: read
id-token: write
jobs:
test_build_and_publish:
if: github.repository == 'JamesHutchison/megamock'
runs-on: ubuntu-latest
environment: production
env:
MEGAMOCK_FOLDERS: megamock tests
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Setup Poetry
# You may pin to the exact commit or the version.
uses: Gr1N/setup-poetry@12c727a3dcf8c1a548d8d041c9d5ef5cebb3ba2e
- name: test
uses: ./.github/actions/test
- name: Build distributions
run: |
poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1