Skip to content

Commit 2707a3d

Browse files
🐞 fix: build number is missed
build number is missed from notification mail
1 parent 3d335c5 commit 2707a3d

5 files changed

Lines changed: 18 additions & 17 deletions

File tree

.github/workflows/dev.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: dev build CI
44

55
# Controls when the action will run.
66
on:
7-
# Triggers the workflow on push or pull request events but only for the master branch
7+
# Triggers the workflow on push or pull request events
88
push:
99
branches:
1010
- '*'
@@ -47,7 +47,7 @@ jobs:
4747
python -m pip install --upgrade pip
4848
pip install tox tox-gh-actions poetry
4949
50-
# declare env.package_version, env.package_version, env.repo_owner, env.repo_name, env.package_name so you may use it in web hooks.
50+
# declare package_version, repo_owner, repo_name, package_name so you may use it in web hooks.
5151
- name: Declare variables for convenient use
5252
id: variables_step
5353
run: |
@@ -88,6 +88,7 @@ jobs:
8888
- name: Build wheels and source tarball
8989
run: |
9090
poetry version $(poetry version --short)-dev.$GITHUB_RUN_NUMBER
91+
poetry lock
9192
poetry build
9293
9394
- name: publish to Test PyPI
@@ -116,16 +117,16 @@ jobs:
116117
password: ${{ secrets.BUILD_NOTIFY_MAIL_PASSWORD }}
117118
from: build-bot
118119
to: ${{ secrets.BUILD_NOTIFY_MAIL_RCPT }}
119-
subject: ${{ needs.test.outputs.package_name }}.${{ needs.test.outputs.package_version}} build successfully
120+
subject: ${{ needs.test.outputs.package_name }}.${{ needs.test.outputs.package_version}}.${{ github.run_number }} build successfully
120121
convert_markdown: true
121122
html_body: |
122123
## Build Success
123-
${{ needs.test.outputs.package_name }}.${{ needs.test.outputs.package_version }} is built and published to test pypi
124+
${{ needs.test.outputs.package_name }}.${{ needs.test.outputs.package_version }}.dev.${{ github.run_number }} is built and published to test pypi
124125
125126
## Change Details
126127
${{ github.event.head_commit.message }}
127128
128-
For more information, please check change history at https://${{ needs.test.outputs.repo_owner }}.github.io/${{ needs.test.outputs.repo_name }}/${{ needs.test.output.package_version }}/history
129+
For more information, please check change history at https://${{ needs.test.outputs.repo_owner }}.github.io/${{ needs.test.outputs.repo_name }}/${{ needs.test.outputs.package_version }}.dev/history
129130
130131
## Package Download
131132
The pacakge is available at: https://test.pypi.org/project/${{ needs.test.outputs.package_name }}/
@@ -140,7 +141,7 @@ jobs:
140141
password: ${{ secrets.BUILD_NOTIFY_MAIL_PASSWORD }}
141142
from: build-bot
142143
to: ${{ secrets.BUILD_NOTIFY_MAIL_RCPT }}
143-
subject: ${{ needs.test.outputs.package_name }}.${{ needs.test.outputs.package_version}} build failure
144+
subject: ${{ needs.test.outputs.package_name }}.${{ needs.test.outputs.package_version}}.dev.${{ github.run_number }} build failure
144145
convert_markdown: true
145146
html_body: |
146147
## Change Details

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
python -m pip install --upgrade pip
5050
pip install tox-gh-actions poetry
5151
52-
# declare package_version, package_version, repo_owner, repo_name, package_name so you may use it in web hooks.
52+
# declare package_version, repo_owner, repo_name, package_name so you may use it in web hooks.
5353
- name: Declare variables for convenient use
5454
id: variables_step
5555
run: |

docs/history.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# History
2-
!!! Info
3-
`(#{number})` means an issue of this project. You may check details of the issue by visiting https://github.com/zillionare/python-project-wizard/issues/_{number}_
42

3+
## v1.3.3
4+
*[#31](https://github.com/zillionare/python-project-wizard/issues/31) Use peotry to create test environment when running tox
55
## v1.3.2
66
*[#28](https://github.com/zillionare/python-project-wizard/issues/28) Send notification mail whenever build success or failed
77
*[#27](https://github.com/zillionare/python-project-wizard/issues/27) failed to send build notfication mail due to no from field

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool]
22
[tool.poetry]
33
name = "ppw"
4-
version = "1.3.2"
4+
version = "1.3.3"
55
description = "A Wizard to create a skeleton python project with up-to-date technology"
66
license = "BSD-3-Clause"
77
authors = ["Aaron Yang <aaron_yang@jieyu.ai>"]

{{cookiecutter.project_slug}}/.github/workflows/dev.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ on:
1111
pull_request:
1212
branches:
1313
- '*'
14+
1415
# Allows you to run this workflow manually from the Actions tab
1516
workflow_dispatch:
1617

1718
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1819
jobs:
19-
# This workflow contains a single job called "build"
2020
test:
2121
# The type of runner that the job will run on
2222
strategy:
@@ -133,16 +133,16 @@ jobs:
133133
password: ${{ secrets.BUILD_NOTIFY_MAIL_PASSWORD }}
134134
from: build-bot
135135
to: ${{ secrets.BUILD_NOTIFY_MAIL_RCPT }}
136-
subject: ${{ needs.test.outputs.package_name }}.${{ needs.test.outputs.package_version}} build successfully
136+
subject: ${{ needs.test.outputs.package_name }}.${{ needs.test.outputs.package_version}}.${{ github.run_number }} build successfully
137137
convert_markdown: true
138138
html_body: |
139139
## Build Success
140-
${{ needs.test.outputs.package_name }}.${{ needs.test.outputs.package_version }} is built and published to test pypi
140+
${{ needs.test.outputs.package_name }}.${{ needs.test.outputs.package_version }}.dev.${{ github.run_number }} is built and published to test pypi
141141
142142
## Change Details
143143
${{ github.event.head_commit.message }}
144144
145-
For more information, please check change history at https://${{ needs.test.outputs.repo_owner }}.github.io/${{ needs.test.outputs.repo_name }}/${{ needs.test.outputs.package_version }}/history
145+
For more information, please check change history at https://${{ needs.test.outputs.repo_owner }}.github.io/${{ needs.test.outputs.repo_name }}/${{ needs.test.outputs.package_version }}.dev/history
146146
147147
## Package Download
148148
The pacakge is available at: https://test.pypi.org/project/${{ needs.test.outputs.package_name }}/
@@ -157,7 +157,7 @@ jobs:
157157
password: ${{ secrets.BUILD_NOTIFY_MAIL_PASSWORD }}
158158
from: build-bot
159159
to: ${{ secrets.BUILD_NOTIFY_MAIL_RCPT }}
160-
subject: ${{ needs.test.outputs.package_name }}.${{ needs.test.outputs.package_version}} build failure
160+
subject: ${{ needs.test.outputs.package_name }}.${{ needs.test.outputs.package_version}}.dev.${{ github.run_number }} build failure
161161
convert_markdown: true
162162
html_body: |
163163
## Change Details
@@ -178,8 +178,8 @@ jobs:
178178
# title: CI Notification | Success
179179
# text: |
180180
# ### Build Success
181-
# ${{ needs.test.outputs.package_version_full }} is built and published to test pypi
181+
# ${{ needs.test.outputs.package_version }}.dev.${{ github.run_number }} is built and published to test pypi
182182
# ### Change History
183-
# Please check change history at https://${{ needs.test.outputs.repo_owner }}.github.io/${{ needs.test.outputs.repo_name }}/history
183+
# Please check change history at https://${{ needs.test.outputs.repo_owner }}.github.io/${{ needs.test.outputs.repo_name }}/${{ needs.test.outputs.package_version }}.dev/history
184184
# ### Package Download
185185
# Please download the pacakge at: https://test.pypi.org/project/${{ needs.test.outputs.repo_name }}/

0 commit comments

Comments
 (0)