Skip to content

Commit cf3a07b

Browse files
authored
ci: update release ci (#409)
* update release ci * rename file * rename file
1 parent d6c21ba commit cf3a07b

File tree

2 files changed

+47
-40
lines changed

2 files changed

+47
-40
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# SPDX-FileCopyrightText: Contributors to atlite <https://github.com/pypsa/atlite>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
name: Release
6+
7+
on:
8+
push:
9+
tags:
10+
- v*.*.*
11+
12+
jobs:
13+
build:
14+
# Build the Python SDist and wheel, performs metadata and readme linting
15+
name: Build and verify package
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: hynek/build-and-inspect-python-package@v2
20+
21+
release:
22+
# Publish a GitHub release from the given git tag
23+
name: Create GitHub Release
24+
needs: [build]
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: softprops/action-gh-release@v2
29+
with:
30+
generate_release_notes: true
31+
32+
publish:
33+
# Publish the built SDist and wheel from "dist" job to PyPI
34+
name: Publish to PyPI
35+
needs: [build]
36+
runs-on: ubuntu-latest
37+
environment:
38+
name: pypi
39+
url: https://pypi.org/project/${{ github.event.repository.name }}
40+
permissions:
41+
id-token: write
42+
steps:
43+
- uses: actions/download-artifact@v4
44+
with:
45+
name: Packages
46+
path: dist
47+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)