Compare commits
13 Commits
26f39a20c7
...
e7760d0b7b
Author | SHA1 | Date | |
---|---|---|---|
e7760d0b7b | |||
f68fe68048 | |||
28b357989c | |||
fcd9f1ca69 | |||
5145017bd6 | |||
9b88b680f0 | |||
e4f0ac9ffe | |||
9c46b45648 | |||
204f10529d | |||
bf8010d654 | |||
e8de18d5c3 | |||
8ccd60219f | |||
5bebb80e44 |
@ -9,7 +9,7 @@ pillow==11.0.0
|
|||||||
PyJWT==2.10.1
|
PyJWT==2.10.1
|
||||||
requests==2.32.3
|
requests==2.32.3
|
||||||
requests-toolbelt==1.0.0
|
requests-toolbelt==1.0.0
|
||||||
sentry-sdk==2.19.0
|
sentry-sdk==2.19.2
|
||||||
tomlkit==0.13.2
|
tomlkit==0.13.2
|
||||||
urllib3==2.2.3
|
urllib3==2.2.3
|
||||||
webex-bot==0.5.2
|
webex-bot==0.5.2
|
||||||
|
@ -32,11 +32,23 @@ jobs:
|
|||||||
python-version: "${{ vars.PYTHON_VERSION }}"
|
python-version: "${{ vars.PYTHON_VERSION }}"
|
||||||
|
|
||||||
- name: Setup Poetry
|
- name: Setup Poetry
|
||||||
run: curl -sSL https://install.python-poetry.org | python3 -
|
uses: abatilo/actions-poetry@v3
|
||||||
|
# run: curl -sSL https://install.python-poetry.org | python3 -
|
||||||
|
|
||||||
- name: Update PATH
|
- name: Update PATH
|
||||||
run: export PATH="/root/.local/bin:$PATH"
|
run: export PATH="/root/.local/bin:$PATH"
|
||||||
|
|
||||||
|
- name: Setup virtual environment
|
||||||
|
run: |
|
||||||
|
/root/.local/bin/poetry config virtualenvs.create true --local
|
||||||
|
/root/.local/bin/poetry config virtualenvs.in-project true --local
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Define cache for dependencies
|
||||||
|
with:
|
||||||
|
path: ./.venv
|
||||||
|
key: venv-${{ hashFiles('poetry.lock') }}
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: /root/.local/bin/poetry install
|
run: /root/.local/bin/poetry install
|
||||||
|
|
||||||
|
@ -19,6 +19,10 @@ jobs:
|
|||||||
if: ${{ !contains(gitea.event.issue.number, '436') || !contains(gitea.event.comment.body, '/trigger-release') || !contains(gitea.event.comment.user.login, 'luke') }}
|
if: ${{ !contains(gitea.event.issue.number, '436') || !contains(gitea.event.comment.body, '/trigger-release') || !contains(gitea.event.comment.user.login, 'luke') }}
|
||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
||||||
|
- name: Delete issue comment
|
||||||
|
run: |
|
||||||
|
curl -X DELETE -H "Authorization: token ${{ gitea.token }}" "${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/issues/comments/${{ gitea.event.comment.id }}"
|
||||||
|
|
||||||
get_latest_tag:
|
get_latest_tag:
|
||||||
name: Get latest tag
|
name: Get latest tag
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -27,24 +31,28 @@ jobs:
|
|||||||
latesttag: ${{ steps.latesttag.outputs.latesttag }}
|
latesttag: ${{ steps.latesttag.outputs.latesttag }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.7
|
- uses: actions/checkout@v4.1.7
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
- name: Get latest tag
|
- name: Get latest tag
|
||||||
id: latesttag
|
id: latesttag
|
||||||
run: |
|
run: |
|
||||||
git fetch --tags
|
LATESTTAG=$(git describe --tags --abbrev=0)
|
||||||
echo "latesttag=$(git describe --tags --abbrev=0)" >> "$GITEA_OUTPUT"
|
echo "latesttag=$LATESTTAG" >> "$GITEA_OUTPUT"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Unit Test
|
name: Unit Test
|
||||||
needs: get_latest_tag
|
needs: get_latest_tag
|
||||||
uses: https://git.tainton.uk/public/webexmemebot/.gitea/workflows/ci.yml@${{ needs.get_latest_tag.outputs.latesttag }}
|
uses: https://git.tainton.uk/public/webexmemebot/.gitea/workflows/ci.yml@${{ needs.get_latest_tag.outputs.latesttag }}
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
create_release:
|
create_release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
# needs: test
|
||||||
outputs:
|
outputs:
|
||||||
release_name: ${{ steps.tag_version.outputs.new_tag }}
|
release_name: ${{ steps.tag_version.outputs.new_tag }}
|
||||||
success: ${{ steps.set_flag.outputs.success }}
|
success: ${{ steps.set_flag.outputs.success }}
|
||||||
|
srvurl: ${{ steps.set_srvurl.outputs.srvurl }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.7
|
- uses: actions/checkout@v4.1.7
|
||||||
with:
|
with:
|
||||||
@ -57,14 +65,34 @@ jobs:
|
|||||||
echo "$CHANGES"
|
echo "$CHANGES"
|
||||||
if [ -z "$CHANGES" ]; then echo "changes=false" >> "$GITEA_OUTPUT"; else echo "changes=true" >> "$GITEA_OUTPUT"; fi
|
if [ -z "$CHANGES" ]; then echo "changes=false" >> "$GITEA_OUTPUT"; else echo "changes=true" >> "$GITEA_OUTPUT"; fi
|
||||||
|
|
||||||
- name: Bump version and push tag
|
- name: Set server URL
|
||||||
id: tag_version
|
id: set_srvurl
|
||||||
if: steps.changes.outputs.changes == 'true'
|
run: |
|
||||||
uses: mathieudutour/github-tag-action@v6.2
|
SRVURL=$(echo "${{ gitea.server_url }}" | sed 's/https:\/\/\(.*\)/\1/')
|
||||||
|
echo "srvurl=$SRVURL" >> "$GITEA_OUTPUT"
|
||||||
|
|
||||||
|
- name: Get next version
|
||||||
|
uses: TriPSs/conventional-changelog-action@v6
|
||||||
|
id: get_next_version
|
||||||
with:
|
with:
|
||||||
github_token: ${{ gitea.token }}
|
git-url: ${{ steps.set_srvurl.outputs.srvurl }}
|
||||||
default_bump: minor
|
github-token: ${{ gitea.token }}
|
||||||
# default_bump: false
|
skip-commit: true
|
||||||
|
release-count: 1
|
||||||
|
output-file: false
|
||||||
|
create-summary: true
|
||||||
|
skip-on-empty: true
|
||||||
|
skip-version-file: true
|
||||||
|
skip-tag: true
|
||||||
|
|
||||||
|
# - name: Bump version and push tag
|
||||||
|
# id: tag_version
|
||||||
|
# if: steps.changes.outputs.changes == 'true'
|
||||||
|
# uses: mathieudutour/github-tag-action@v6.2
|
||||||
|
# with:
|
||||||
|
# github_token: ${{ gitea.token }}
|
||||||
|
# default_bump: minor
|
||||||
|
# # default_bump: false
|
||||||
|
|
||||||
- name: Build Changelog
|
- name: Build Changelog
|
||||||
uses: mikepenz/release-changelog-builder-action@v4
|
uses: mikepenz/release-changelog-builder-action@v4
|
||||||
@ -72,6 +100,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ gitea.token }}
|
GITHUB_TOKEN: ${{ gitea.token }}
|
||||||
with:
|
with:
|
||||||
|
platform: "gitea"
|
||||||
configurationJson: |
|
configurationJson: |
|
||||||
{
|
{
|
||||||
"pr_template": "- #{{TITLE}} ([##{{NUMBER}}](#{{URL}}))",
|
"pr_template": "- #{{TITLE}} ([##{{NUMBER}}](#{{URL}}))",
|
||||||
@ -102,8 +131,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
|
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
|
||||||
with:
|
with:
|
||||||
tag: ${{ steps.tag_version.outputs.new_tag }}
|
tag: ${{ steps.get_next_version.outputs.tag }}
|
||||||
name: ${{ steps.tag_version.outputs.new_tag }}
|
name: ${{ steps.get_next_version.outputs.tag }}
|
||||||
body: ${{ steps.build_changelog.outputs.changelog }}
|
body: ${{ steps.build_changelog.outputs.changelog }}
|
||||||
|
|
||||||
- name: Set success/fail flag
|
- name: Set success/fail flag
|
||||||
|
Loading…
Reference in New Issue
Block a user