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

Commit 75568dd

Browse files
committed
Add workflow to create draft release based on default template
1 parent 7642a0e commit 75568dd

File tree

3 files changed

+36
-64
lines changed

3 files changed

+36
-64
lines changed

.github/release_template.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Notes
2+
* First Note
3+
4+
# Changes

.github/workflows/build_publish.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Create a draft release
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+
autorelease:
11+
name: Create release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- name: Set up Python 3.11
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: 3.11
22+
- name: Release Notes
23+
run: |
24+
git log $(git describe HEAD~ --tags --abbrev=0)..HEAD --pretty='format:* %h %s%n' --no-merges >> ".github/release_template.md"
25+
- name: Create Release Draft
26+
uses: softprops/action-gh-release@v1
27+
if: github.repository == 'microsoft/kiota-http-python' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
28+
with:
29+
body_path: ".github/release_template.md"
30+
draft: true
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)