-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π§βπ» Further automate CD (#1005)
* β¨ Add workflow to detect new version & push a tag on success * π Bump version * π Renaming * π Renaming v2 * π Fix tag * π Update release process * π Add links
- Loading branch information
Showing
3 changed files
with
59 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Detect if package version has been bumped & if so, trigger a release. | ||
|
||
# Take the version from pyproject.toml and check if a git tag for this version exists. | ||
# If not, trigger the release worfklow (cd.yml) by pushing a new tag to the repository. | ||
|
||
name: Detect and tag new version | ||
|
||
on: | ||
push: | ||
branches: | ||
- "2.0" | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
check-version-and-push-tag: | ||
name: Detect and create a tag for new version | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Rye | ||
uses: eifinger/setup-rye@v4 | ||
|
||
- name: Get package version from pyproject.toml | ||
id: get-version | ||
run: echo "version=$(rye version)" >> $GITHUB_OUTPUT | ||
|
||
- name: Check if a tag for this version already exists in the repo | ||
uses: mukunku/[email protected] | ||
id: check-tag | ||
with: | ||
tag: v${{ steps.get-version.outputs.version }} | ||
|
||
- name: Publish the new tag | ||
# Trigger the cd.yml workflow if a new tag is detected. | ||
if: steps.check-tag.outputs.exists != 'true' | ||
run: | | ||
git tag -a v${{ steps.get-version.outputs.version }} -m "Release v${{ steps.get-version.outputs.version }}" | ||
git push origin v${{ steps.get-version.outputs.version }} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[project] | ||
name = "viadot2" | ||
version = "2.1.6" | ||
version = "2.1.7" | ||
description = "A simple data ingestion library to guide data flows from some places to other places." | ||
authors = [ | ||
{ name = "acivitillo", email = "[email protected]" }, | ||
|