-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (36 loc) · 1.28 KB
/
pypi-publish.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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: build
on:
push:
branches:
- master
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: pip3 install bump
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Danny Veldhoen"
# This will also trigger the bump action at the same time
- run: |
export VERSION=`bump`
git commit -m "Bumped version to $VERSION" -a
# Push back to repo
- run: git push https://${{secrets.GPR_TOKEN}}@github.com/dveldhoen/easyinvoice-pip
publish-to-pypi:
needs: bump-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
# Install build dependencies
- run: npm run install-dependencies
# Install npm dependecies
- run: npm i
# Build the package
- run: npm run build
# Publish the package
- run: python3 -m twine upload -u ${{secrets.PYPI_USERNAME}} -p ${{secrets.PYPI_PASSWORD}} dist/*