Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Commit f64b0f8

Browse files
authored
Merge pull request #269 from microsoft/chore/workflow-improvements
Chore/workflow improvements
2 parents 0ba39ad + 686735f commit f64b0f8

File tree

5 files changed

+122
-23
lines changed

5 files changed

+122
-23
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: bug
6+
---
7+
8+
**Environment**
9+
10+
- Python Version:
11+
- kiota-http version:
12+
- OS:
13+
14+
**Stack trace (if available)**
15+
Screenshot or `formatted` copy and paste of your stack trace.
16+
17+
**Describe the bug**
18+
A clear and concise description of what the bug is.
19+
20+
**To Reproduce**
21+
Steps to reproduce the behavior:
22+
23+
**Expected behavior**
24+
A clear and concise description of what you expected to happen.
25+
26+
**Screenshots**
27+
If applicable, add screenshots to help explain your problem.
28+
29+
**Additional context**
30+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest a feature for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Overview
2+
3+
Brief description of what this PR does, and why it is needed.
4+
5+
## Related Issue
6+
7+
Fixes # (issue)
8+
9+
### Demo
10+
11+
Optional. Screenshots, `curl` examples, etc.
12+
13+
### Notes
14+
15+
Optional. Ancillary topics, caveats, alternative strategies that didn't work out, anything else.
16+
17+
## Testing Instructions
18+
19+
* How to test this PR
20+
* Prefer bulleted description
21+
* Start after checking out this branch
22+
* Include any setup required, such as bundling scripts, restarting services, etc.
23+
* Include test case, and expected output

.github/workflows/build_publish.yml renamed to .github/workflows/build.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Python HTTP
22

33
on:
44
workflow_dispatch:
5+
workflow_call:
56
push:
67
branches: [main]
78
pull_request:
@@ -39,26 +40,3 @@ jobs:
3940
- name: Run tests with Pytest
4041
run: |
4142
pytest
42-
43-
publish:
44-
name: Publish distribution to PyPI
45-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
46-
runs-on: ubuntu-latest
47-
environment: pypi_prod
48-
needs: [build]
49-
steps:
50-
- name: Checkout code
51-
uses: actions/checkout@v4
52-
- name: Set up Python 3.8
53-
uses: actions/setup-python@v5
54-
with:
55-
python-version: 3.8
56-
- name: Install flit
57-
run: |
58-
pip install flit
59-
- name: Publish the distibution to PyPI
60-
run: flit publish
61-
env:
62-
FLIT_INDEX_URL: https://upload.pypi.org/legacy/
63-
FLIT_USERNAME: __token__
64-
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/publish.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish package to PyPI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags:
7+
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
8+
9+
jobs:
10+
build:
11+
uses: ./.github/workflows/build.yml
12+
13+
publish:
14+
name: Publish distribution to PyPI
15+
runs-on: ubuntu-latest
16+
environment: pypi_prod
17+
needs: [build]
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
- name: Set up Python 3.12
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: 3.12
25+
- name: Install flit
26+
run: |
27+
pip install flit
28+
- name: Publish the distibution to PyPI
29+
run: flit publish
30+
env:
31+
FLIT_INDEX_URL: https://upload.pypi.org/legacy/
32+
FLIT_USERNAME: __token__
33+
FLIT_PASSWORD: ${{ secrets. PYPI_API_TOKEN }}
34+
35+
release:
36+
name: Create release
37+
runs-on: ubuntu-latest
38+
needs: [publish]
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
- name: Extract release notes
43+
id: extract-release-notes
44+
uses: ffurrer2/extract-release-notes@v1
45+
- name: Create release
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
run: gh release create --notes '${{ steps.extract-release-notes.outputs.release_notes }}' --title ${{ github.ref_name }} ${{ github.ref_name }}

0 commit comments

Comments
 (0)