Compare commits
1 Commits
v1.30.1
...
0ba01e53af
Author | SHA1 | Date | |
---|---|---|---|
0ba01e53af |
@ -2,12 +2,18 @@ name: Release
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 9 * * 0'
|
- cron: "0 9 * * 0"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# test:
|
# test:
|
||||||
# name: Test
|
# name: Test
|
||||||
# uses: https://git.tainton.uk/${{ gitea.repository }}/.gitea/workflows/ci.yml@main
|
# uses: https://git.tainton.uk/repos/roboluke/.gitea/workflows/ci.yml@main
|
||||||
|
# with:
|
||||||
|
# python-version: 3.13
|
||||||
|
# secrets:
|
||||||
|
# SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST_URL }}
|
||||||
|
# SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
||||||
|
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||||
|
|
||||||
tag:
|
tag:
|
||||||
name: Tag release
|
name: Tag release
|
||||||
@ -23,26 +29,90 @@ jobs:
|
|||||||
secrets:
|
secrets:
|
||||||
ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
|
ACTIONS_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
|
||||||
|
|
||||||
# get_release_id:
|
get_release_id:
|
||||||
# name: Get Release ID
|
name: Get Release ID
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [tag, create_release]
|
||||||
|
outputs:
|
||||||
|
releaseid: ${{ steps.getid.outputs.releaseid }}
|
||||||
|
steps:
|
||||||
|
- name: Get Release ID
|
||||||
|
id: getid
|
||||||
|
run: |
|
||||||
|
rid=$(curl -s -X 'GET' \
|
||||||
|
-H 'accept: application/json' \
|
||||||
|
'${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/latest' | jq -r '.id')
|
||||||
|
echo "releaseid=$rid" >> "$GITEA_OUTPUT"
|
||||||
|
echo "$rid"
|
||||||
|
|
||||||
|
build_whl:
|
||||||
|
name: Build Wheel File
|
||||||
|
needs: [tag, get_release_id]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4.2.2
|
||||||
|
with:
|
||||||
|
ref: ${{ needs.tag.outputs.tag_name }}
|
||||||
|
# - name: Setup Python
|
||||||
|
# uses: actions/setup-python@v5
|
||||||
|
# with:
|
||||||
|
# python-version: "3.13"
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v5
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
cache-dependency-glob: "uv.lock"
|
||||||
|
- name: Set up Python
|
||||||
|
run: uv python install
|
||||||
|
- name: Update pyproject.toml
|
||||||
|
run: ./tools/update_pyproject.sh ${{ needs.tag.outputs.tag_name }}
|
||||||
|
- name: Install dependencies
|
||||||
|
run: uv sync
|
||||||
|
- name: Build wheel file
|
||||||
|
run: uv build
|
||||||
|
- name: Upload Release Asset
|
||||||
|
run: |
|
||||||
|
for file in dist/*.whl; do
|
||||||
|
curl -s -X POST \
|
||||||
|
-H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" \
|
||||||
|
-H "Content-Type: multipart/form-data" \
|
||||||
|
-F "attachment=@${{ gitea.workspace }}/$file" \
|
||||||
|
"${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/${{ needs.get_release_id.outputs.releaseid }}/assets"
|
||||||
|
done
|
||||||
|
- name: Publish to PyPI
|
||||||
|
run: uv publish
|
||||||
|
env:
|
||||||
|
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
# - name: Publish to PyPI
|
||||||
|
# uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
# with:
|
||||||
|
# # user: ${{ vars.PYPI_USERNAME }}
|
||||||
|
# user: __token__
|
||||||
|
# password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
|
||||||
|
# publish_pypi:
|
||||||
|
# name: Publish to PyPI
|
||||||
|
# needs: build_whl
|
||||||
# runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
# needs: create_release
|
|
||||||
# outputs:
|
|
||||||
# releaseid: ${{ steps.getid.outputs.releaseid }}
|
|
||||||
# steps:
|
# steps:
|
||||||
# - name: Get Release ID
|
# - name: Create dist folder
|
||||||
# id: getid
|
# run: mkdir -p dist
|
||||||
# run: |
|
# - uses: actions/download-artifact@v4
|
||||||
# rid=$(curl -s -X 'GET' \
|
# with:
|
||||||
# -H 'accept: application/json' \
|
# name: whl
|
||||||
# '${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/latest' | jq -r '.id')
|
# path: dist
|
||||||
# echo "releaseid=$rid" >> "$GITEA_OUTPUT"
|
# - name: Publish to PyPI
|
||||||
# echo "$rid"
|
# uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
# with:
|
||||||
|
# # user: ${{ vars.PYPI_USERNAME }}
|
||||||
|
# user: __token__
|
||||||
|
# password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
|
||||||
create_docker:
|
create_docker:
|
||||||
name: Publish Docker Images
|
name: Publish Docker Images
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [tag, create_release]
|
needs: tag
|
||||||
steps:
|
steps:
|
||||||
- name: Update Docker configuration
|
- name: Update Docker configuration
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
@ -4,7 +4,7 @@ import logging
|
|||||||
|
|
||||||
from webex_bot.models.command import Command
|
from webex_bot.models.command import Command
|
||||||
from webex_bot.models.response import Response, response_from_adaptive_card
|
from webex_bot.models.response import Response, response_from_adaptive_card
|
||||||
from webexpythonsdk.models.cards import (
|
from webexteamssdk.models.cards import (
|
||||||
AdaptiveCard,
|
AdaptiveCard,
|
||||||
Column,
|
Column,
|
||||||
ColumnSet,
|
ColumnSet,
|
||||||
@ -14,7 +14,7 @@ from webexpythonsdk.models.cards import (
|
|||||||
Text,
|
Text,
|
||||||
TextBlock,
|
TextBlock,
|
||||||
)
|
)
|
||||||
from webexpythonsdk.models.cards.actions import Submit
|
from webexteamssdk.models.cards.actions import Submit
|
||||||
|
|
||||||
from app.utils.config import config
|
from app.utils.config import config
|
||||||
from app.utils.n8n import get_tasks, submit_task
|
from app.utils.n8n import get_tasks, submit_task
|
||||||
|
Reference in New Issue
Block a user