Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

Commit c36696b

Browse files
authored
Merge pull request #2 from apilytics/fix-ci-cd
CI/CD fixes
2 parents 7e20566 + ee2ef3a commit c36696b

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/cd.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ jobs:
2727
run: sed -i 's/^version *=.*/version = "${{ github.event.inputs.version }}"/' pyproject.toml
2828

2929
- name: "Extract version's changelog for release notes and tag message"
30-
# Find the lines between the first `## [<number>` and the second `## [<number>`.
31-
run: sed '1,/^## *\[[0-9]/d;/^## *\[[0-9]/Q' CHANGELOG.md > release_notes.txt
30+
# 1. Find the lines between the first `## [<number>` and the second `## [<number>`.
31+
# 2. Remove all leading and trailing newlines from the output.
32+
run: sed '1,/^## *\[[0-9]/d;/^## *\[[0-9]/Q' CHANGELOG.md | sed -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba' > release_notes.txt
3233

3334
- name: "Set up Python"
3435
id: setup-python
@@ -55,7 +56,7 @@ jobs:
5556
with:
5657
add: '["pyproject.toml", "CHANGELOG.md"]'
5758
message: 'Release ${{ github.event.inputs.version }}'
58-
tag: 'v${{ github.event.inputs.version }} --annotate'
59+
tag: 'v${{ github.event.inputs.version }} --annotate --message=""'
5960
default_author: github_actions
6061

6162
- name: "Create a GitHub release"

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ jobs:
9393
tests:
9494
name: "Tests"
9595
needs: [linters, build]
96+
if: ${{ !failure() }}
9697
strategy:
9798
fail-fast: true
9899
matrix:

0 commit comments

Comments
 (0)