-
Notifications
You must be signed in to change notification settings - Fork 3
29 lines (28 loc) · 940 Bytes
/
release.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
name: Release
on: [push, pull_request, workflow_dispatch]
jobs:
release:
name: Deploy release to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install dependencies
run: pip install -U pip build wheel setuptools
- name: Build distributions
run: python -m build
- name: Upload package as artifact to GitHub
if: github.repository == 'corvince/mesa-interactive' && startsWith(github.ref, 'refs/tags')
uses: actions/upload-artifact@v3
with:
name: package
path: dist/
- name: Publish package to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1