-
Notifications
You must be signed in to change notification settings - Fork 101
47 lines (42 loc) · 1.13 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
# SPDX-FileCopyrightText: Contributors to atlite <https://github.com/pypsa/atlite>
#
# SPDX-License-Identifier: CC0-1.0
name: Release
on:
push:
tags:
- v*.*.*
jobs:
build:
# Build the Python SDist and wheel, performs metadata and readme linting
name: Build and verify package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hynek/build-and-inspect-python-package@v2
release:
# Publish a GitHub release from the given git tag
name: Create GitHub Release
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
publish:
# Publish the built SDist and wheel from "dist" job to PyPI
name: Publish to PyPI
needs: [build]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/${{ github.event.repository.name }}
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1