-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (53 loc) · 1.46 KB
/
package.yml
File metadata and controls
62 lines (53 loc) · 1.46 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
name: '📦 Python Package'
on:
push:
tags:
- 'v*.*.*'
branches:
- "!*"
paths:
- '*.py'
- '.github/workflows/*.yml'
- '.github/workflows/*.json'
- '!**/README.md'
permissions:
contents: write
pull-requests: read
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
id-token: write
steps:
- name: '⏳ Checkout repository'
uses: actions/checkout@v6
- name: '🐍 Set up Python 3'
uses: actions/setup-python@v6
with:
cache: 'pip'
python-version: "3.12"
- name: '🛠 Install dependencies'
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: '📦 Build package'
run: python3 -m build
- name: "✏️ Generate changelog"
id: changelog
uses: mikepenz/release-changelog-builder-action@v6
with:
configuration: '.github/workflows/changelog.json'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: '🔥 Create release'
uses: softprops/action-gh-release@26e8ad27a09a225049a7075d7ec1caa2df6ff332
with:
draft: false
files: dist/*
body: ${{steps.changelog.outputs.changelog}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: '📦 Publish to PyPI'
uses: pypa/gh-action-pypi-publish@release/v1