-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jens Peder Meldgaard <[email protected]>
- Loading branch information
1 parent
4b852b3
commit 6ff377a
Showing
3 changed files
with
64 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Integration Tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
push: | ||
description: "Push event" | ||
type: boolean | ||
default: false | ||
changelog_path: | ||
description: "Path to the changelog body" | ||
type: string | ||
default: "body.md" | ||
secrets: | ||
GITHUB_TOKEN: | ||
required: true | ||
description: The GitHub token to interact with the GitHub API. | ||
outputs: | ||
name: | ||
value: ${{ jobs.version.outputs.name }} | ||
description: The name of the package. | ||
old_version: | ||
value: ${{ jobs.version.outputs.old_version }} | ||
description: The old version of the package. | ||
new_version: | ||
value: ${{ jobs.version.outputs.new_version }} | ||
description: The new version of the package. | ||
|
||
jobs: | ||
version: | ||
name: Set Name and Version from pyproject.toml to output | ||
runs-on: ubuntu-latest | ||
outputs: | ||
name: ${{ steps.project.outputs.NAME }} | ||
old_version: ${{ steps.project.outputs.OLD_VERSION }} | ||
new_version: ${{ steps.cz.outputs.version }} | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
with: | ||
token: "${{ secrets.GITHUB_TOKEN }}" | ||
fetch-depth: 0 | ||
- name: Set Name and Version from pyproject.toml to output | ||
id: project | ||
run: | | ||
name=$(grep "^name" pyproject.toml -m 1 | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3 | tr "-" "_") | ||
version=$(grep "^version" pyproject.toml -m 1 | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3) | ||
echo "NAME=$name" >> $GITHUB_OUTPUT | ||
echo "OLD_VERSION=$version" >> $GITHUB_OUTPUT | ||
echo "Releasing $name version $version" | ||
- name: Create bump and changelog | ||
id: cz | ||
uses: commitizen-tools/commitizen-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
push: ${{ inputs.push }} | ||
changelog_increment_filename: ${{ inputs.changelog_path }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters