-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (60 loc) · 2.02 KB
/
release.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Create Release And Publish
on:
push:
workflow_dispatch:
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
jobs:
Extract-tags:
runs-on: ubuntu-latest
outputs:
prevtag: ${{ steps.prevversion.outputs.tag }}
currtag: ${{ steps.getstdout.outputs.currversion }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get Previous tag
id: prevversion
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 0.1.0
- name: Get Current tag
id: getstdout
run: echo "::set-output name=currversion::$(chmod +x $GITHUB_WORKSPACE/diffver.sh && $GITHUB_WORKSPACE/diffver.sh)"
Create-Tag-And-Release:
if: ${{ needs.Extract-tags.outputs.prevtag != needs.Extract-tags.outputs.currtag }}
runs-on: ubuntu-latest
needs:
Extract-tags
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
#- run: echo ${{ needs.Extract-tags.outputs.prevtag }} ${{ needs.Extract-tags.outputs.currtag }}
- name: Create Tag
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ needs.Extract-tags.outputs.currtag }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.Extract-tags.outputs.currtag }}
generate_release_notes: true
Typecheck-And-Pubish-Release-To-Pypi:
runs-on: ubuntu-latest
needs:
Create-Tag-And-Release
#Extract-tags
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: |
python3 -m pip install mypy poetry rich
poetry install
mypy $GITHUB_WORKSPACE/ceg --install-types --non-interactive
echo "See \`Project's Readme <https://www.github.com/justaus3r/ceg/blob/Master/README.rst>\`_ for info" > README.rst
poetry publish --build
shell: 'bash'