Debian Codegraph @

.github/workflows/deploy.yml

raw symbols SCIP
1 name: Deploy and Release
2
3 # Controls when the workflow will run
4 on:
5 # Triggers the workflow on version change
6 push:
7 branches:
8 - master
9 paths:
10 - dpath/version.py
11
12 # A workflow run is made up of one or more jobs that can run sequentially or in parallel
13 jobs:
14 # This workflow contains a single job called "deploy"
15 deploy:
16 # The type of runner that the job will run on
17 runs-on: ubuntu-latest
18
19 # Steps represent a sequence of tasks that will be executed as part of the job
20 steps:
21 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22 - uses: actions/checkout@v2
23
24 - name: Get Version
25 id: get-version
26 run: |
27 python -c "from dpath.version import VERSION; print(f'::set-output name=version::v{VERSION}');"
28
29 - name: Check Tag
30 uses: mukunku/[email protected]
31 id: check-tag
32 with:
33 tag: ${{ steps.get-version.outputs.version }}
34 env:
35 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36
37 - name: Create Tag
38 if: steps.check-tag.outputs.exists == 'false'
39 uses: negz/create-tag@v1
40 with:
41 version: ${{ steps.get-version.outputs.version }}
42 token: ${{ secrets.GITHUB_TOKEN }}
43
44 - name: Generate Changelog
45 id: generate-changelog
46 uses: loopwerk/tag-changelog@v1
47 with:
48 token: ${{ secrets.GITHUB_TOKEN }}
49 config_file: .github/tag-changelog-config.js
50
51 - name: PyPI Deployment
52 uses: casperdcl/deploy-pypi@v2
53 with:
54 # PyPI username
55 user: ${{ secrets.PYPI_USER }}
56 # PyPI password or API token
57 password: ${{ secrets.PYPI_PASS }}
58 # `setup.py` command to run ("true" is a shortcut for "clean sdist -d <dist_dir> bdist_wheel -d <dist_dir>")
59 build: clean sdist -d dist/
60 # `pip` command to run ("true" is a shortcut for "wheel -w <dist_dir> --no-deps .")
61 pip: true
62
63 - name: Github Release
64 uses: softprops/action-gh-release@v1
65 with:
66 tag_name: ${{ steps.get-version.outputs.version }}
67 body: ${{ steps.generate-changelog.outputs.changes }}
68 files: dist/*