-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (49 loc) · 1.93 KB
/
publish.yml
File metadata and controls
53 lines (49 loc) · 1.93 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
name: Upload Python Package & nuget
on:
push:
branches:
- master
jobs:
publish:
name: build, pack & push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Required in case of previous dotnet SDK versions as the host always has latest version installed
# Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest
# - name: Setup dotnet
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 3.1.100
# Publish
- name: publish on version change
uses: rohith/publish-nuget@v2
with:
PROJECT_FILE_PATH: Plugins/Plugins.csproj # Relative to repository root
# PACKAGE_NAME: NuGet package id, REQUIRED if it's different from project name
# VERSION_FILE_PATH: Directory.Build.props # Relative to repository root, defaults to project file
VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group
# VERSION_STATIC: Static version, useful for external providers like Nerdbank.GitVersioning
# TAG_COMMIT: true # Flag to enable / disable git tagging
# TAG_FORMAT: v* # Format of the git tag, [*] gets replaced with version
# NUGET_KEY: ${{secrets.NUGET_API_KEY}} # API key for the NuGet feed
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# pip install wheel pycparser
# pip install twine pythonnet
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*