-
Notifications
You must be signed in to change notification settings - Fork 880
49 lines (47 loc) · 1.14 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Release
on:
push:
tags:
- '*'
branches:
- main
- release**
paths-ignore:
- '**.md'
- '**.rst'
pull_request:
paths-ignore:
- '**.md'
- '**.rst'
workflow_dispatch:
schedule:
- cron: '0 6 * * 1'
permissions:
id-token: write
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@v5
with:
python-version: "3.12"
cache: 'pip'
- name: Install dependencies
run: pip install -U pip hatch
- name: Build distributions
run: hatch build
- name: Upload package as artifact to GitHub
if: github.repository == 'projectmesa/mesa' && startsWith(github.ref, 'refs/tags')
uses: actions/upload-artifact@v4
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