mirror of
https://github.com/natelandau/obsidian-metadata.git
synced 2025-11-18 01:43:39 -05:00
ci: use CHANGELOG.md for release notes
This commit is contained in:
30
.github/workflows/create-release.yml
vendored
30
.github/workflows/create-release.yml
vendored
@@ -58,22 +58,35 @@ jobs:
|
|||||||
echo $TAG
|
echo $TAG
|
||||||
echo $PROJECT_VERSION
|
echo $PROJECT_VERSION
|
||||||
if [[ "$TAG" != "v$PROJECT_VERSION" ]]; then exit 1; fi
|
if [[ "$TAG" != "v$PROJECT_VERSION" ]]; then exit 1; fi
|
||||||
|
echo "current_tag=refs/tags/${TAG}" >> $GITHUB_ENV
|
||||||
# ----------------------------------------------
|
|
||||||
# Generate release notes
|
|
||||||
# ----------------------------------------------
|
|
||||||
|
|
||||||
- name: Release Notes
|
|
||||||
run: git log $(git describe HEAD~ --tags --abbrev=0)..HEAD --pretty='format:* %h %s' --no-merges >> ".github/RELEASE-TEMPLATE.md"
|
|
||||||
|
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
# Test and then build the package
|
# Test and then build the package
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
|
|
||||||
- name: run poetry build
|
- name: run poetry build
|
||||||
run: |
|
run: |
|
||||||
poetry run poetry check
|
poetry run poetry check
|
||||||
poetry run coverage run
|
poetry run coverage run
|
||||||
poetry build
|
poetry build
|
||||||
|
# ----------------------------------------------
|
||||||
|
# Generate release notes
|
||||||
|
# ----------------------------------------------
|
||||||
|
|
||||||
|
# - name: Release Notes
|
||||||
|
# run: git log $(git describe HEAD~ --tags --abbrev=0)..HEAD --pretty='format:* %h %s' --no-merges >> ".github/RELEASE-TEMPLATE.md"
|
||||||
|
|
||||||
|
- name: Export tag name to env variable
|
||||||
|
run: |
|
||||||
|
TAG=$(git describe HEAD --tags --abbrev=0)
|
||||||
|
echo "CURRENT_TAG=refs/tags/${TAG}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Get notes
|
||||||
|
id: generate_notes
|
||||||
|
uses: anmarkoulis/commitizen-changelog-reader@master
|
||||||
|
with:
|
||||||
|
tag_name: ${{ env.CURRENT_TAG }}
|
||||||
|
changelog: CHANGELOG.md
|
||||||
|
|
||||||
# ----------------------------------------------
|
# ----------------------------------------------
|
||||||
# Build draft release (Note: Will need to manually publish)
|
# Build draft release (Note: Will need to manually publish)
|
||||||
@@ -82,7 +95,8 @@ jobs:
|
|||||||
- name: Create Release Draft
|
- name: Create Release Draft
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
body_path: ".github/RELEASE-TEMPLATE.md"
|
# body_path: ".github/RELEASE-TEMPLATE.md"
|
||||||
|
body: ${{join(fromJson(steps.generate_notes.outputs.notes).notes, '')}}
|
||||||
draft: true
|
draft: true
|
||||||
files: |
|
files: |
|
||||||
dist/*-${{env.PROJECT_VERSION}}-py3-none-any.whl
|
dist/*-${{env.PROJECT_VERSION}}-py3-none-any.whl
|
||||||
|
|||||||
Reference in New Issue
Block a user