-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (56 loc) · 1.83 KB
/
release.yaml
File metadata and controls
60 lines (56 loc) · 1.83 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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Upload Python Package
on:
push:
branches:
- master
- main
jobs:
deploy:
runs-on: ubuntu-latest
environment: py-production
steps:
- uses: actions/checkout@v3
- name: Read current version
id: version
uses: ashley-taylor/read-json-property-action@v1.1
with:
path: ./release/package.json
property: version
- name: Read realease description
id: description
uses: juliangruber/read-file-action@v1.1.6
with:
path: ./release/description.md
- name: Create GitHub Release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.PROJECT_RELEASE_TOKEN }}
with:
tag_name: v${{steps.version.outputs.value}}
release_name: v${{steps.version.outputs.value}}
body: ${{steps.description.outputs.content}}
draft: false
prerelease: false
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@v1.12.4
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
verify-metadata: false