Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
55 changes: 55 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Tag release

on:
workflow_dispatch:
inputs:
version:
description: 'Tag to be created, in the form vX.Y.Z'
required: true
type: string


jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check if organization member
id: is_organization_member
uses: JamesSingleton/[email protected]
with:
organization: Giskard-AI
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Interrupt job
if: ${{ steps.is_organization_member.outputs.result == 'false' }}
shell: bash
run: |
echo "Job failed due to user not being a member of Giskard-AI organization and the 'safe for build' label not being set on the PR"
exit 1

- name: Checkout code
uses: actions/[email protected]
with:
fetch-tags: true
ref: main
token: ${{ secrets.RELEASE_PAT_TOKEN }} # Needed to trigger other actions

- name: Edit pyproject.toml
run: sed -i "s/\^(version *= *\).*$/\1${{ inputs.version }}/" pyproject.toml

- name: Configure git
run: |
git config --global user.name 'BotReleaser'
git config --global user.email '[email protected]'

- name: Adding file
run: |
git add pyproject.toml
git commit -m "${{ inputs.version }}"
git tag ${{ inputs.version }}

- name: Push to main and tags
run: |
git push origin main
git push origin ${{ inputs.version }}
45 changes: 45 additions & 0 deletions .github/workflows/do-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Tag release

on:
push:
tags:
- "v*.*.*"
permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: 3.10
cache: false
- name: Build dist
run: pdm build

- name: Release
id: github-release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
generate_release_notes: true
files: |
dist/giskard-*.tar.gz
dist/giskard-*.whl

- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.RELEASE_PAT_TOKEN }}
event-type: trigger-release
repository: giskard-ai/giskard-hub
client-payload: |
{
"wheel_url": "${{ steps.github-release.outputs.assets[1].browser_download_url }}",
"version": "${{ github.ref_name }}",
"ref": "${{ github.ref }}",
}
2 changes: 1 addition & 1 deletion .github/workflows/nightly-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
call-full-ci:
uses: ./.github/workflows/build_backend.yml
uses: ./.github/workflows/build-python.yml
with:
run-integration-tests: true
use-cache: false
40 changes: 40 additions & 0 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Tag release

on:
repository_dispatch:
types:
- post-release
permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check if organization member
id: is_organization_member
uses: JamesSingleton/[email protected]
with:
organization: Giskard-AI
username: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Interrupt job
if: ${{ steps.is_organization_member.outputs.result == 'false' }}
shell: bash
run: |
echo "Job failed due to user not being a member of Giskard-AI organization and the 'safe for build' label not being set on the PR"
exit 1
- name: Checkout code
uses: actions/[email protected]
with:
fetch-tags: true
ref: ${{ github.event.client_payload.version }}

- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: 3.10
cache: false

- name: Push to Pipy
run: pdm publish --username ${{ secrets.PIPY_USERNAME }} --password ${{ secrets.PIPY_PASSWORD }}