Compare commits
13 Commits
0e43220095
...
98014fbe0a
Author | SHA1 | Date | |
---|---|---|---|
98014fbe0a | |||
f68fe68048 | |||
28b357989c | |||
fcd9f1ca69 | |||
5145017bd6 | |||
9b88b680f0 | |||
e4f0ac9ffe | |||
9c46b45648 | |||
204f10529d | |||
bf8010d654 | |||
e8de18d5c3 | |||
8ccd60219f | |||
5bebb80e44 |
@ -1,4 +1,4 @@
|
||||
astroid==3.2.4
|
||||
astroid==3.3.8
|
||||
black==24.10.0
|
||||
cfgv==3.4.0
|
||||
click==8.1.8
|
||||
|
@ -32,11 +32,23 @@ jobs:
|
||||
python-version: "${{ vars.PYTHON_VERSION }}"
|
||||
|
||||
- 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
|
||||
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
|
||||
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') }}
|
||||
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:
|
||||
name: Get latest tag
|
||||
runs-on: ubuntu-latest
|
||||
@ -27,24 +31,28 @@ jobs:
|
||||
latesttag: ${{ steps.latesttag.outputs.latesttag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Get latest tag
|
||||
id: latesttag
|
||||
run: |
|
||||
git fetch --tags
|
||||
echo "latesttag=$(git describe --tags --abbrev=0)" >> "$GITEA_OUTPUT"
|
||||
LATESTTAG=$(git describe --tags --abbrev=0)
|
||||
echo "latesttag=$LATESTTAG" >> "$GITEA_OUTPUT"
|
||||
|
||||
test:
|
||||
name: Unit Test
|
||||
needs: get_latest_tag
|
||||
uses: https://git.tainton.uk/public/webexmemebot/.gitea/workflows/ci.yml@${{ needs.get_latest_tag.outputs.latesttag }}
|
||||
continue-on-error: true
|
||||
|
||||
create_release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
# needs: test
|
||||
outputs:
|
||||
release_name: ${{ steps.tag_version.outputs.new_tag }}
|
||||
success: ${{ steps.set_flag.outputs.success }}
|
||||
srvurl: ${{ steps.set_srvurl.outputs.srvurl }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
@ -57,14 +65,34 @@ jobs:
|
||||
echo "$CHANGES"
|
||||
if [ -z "$CHANGES" ]; then echo "changes=false" >> "$GITEA_OUTPUT"; else echo "changes=true" >> "$GITEA_OUTPUT"; fi
|
||||
|
||||
- name: Bump version and push tag
|
||||
id: tag_version
|
||||
if: steps.changes.outputs.changes == 'true'
|
||||
uses: mathieudutour/github-tag-action@v6.2
|
||||
- name: Set server URL
|
||||
id: set_srvurl
|
||||
run: |
|
||||
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:
|
||||
github_token: ${{ gitea.token }}
|
||||
default_bump: minor
|
||||
# default_bump: false
|
||||
git-url: ${{ steps.set_srvurl.outputs.srvurl }}
|
||||
github-token: ${{ gitea.token }}
|
||||
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
|
||||
uses: mikepenz/release-changelog-builder-action@v4
|
||||
@ -72,6 +100,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ gitea.token }}
|
||||
with:
|
||||
platform: "gitea"
|
||||
configurationJson: |
|
||||
{
|
||||
"pr_template": "- #{{TITLE}} ([##{{NUMBER}}](#{{URL}}))",
|
||||
@ -102,8 +131,8 @@ jobs:
|
||||
env:
|
||||
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
|
||||
with:
|
||||
tag: ${{ steps.tag_version.outputs.new_tag }}
|
||||
name: ${{ steps.tag_version.outputs.new_tag }}
|
||||
tag: ${{ steps.get_next_version.outputs.tag }}
|
||||
name: ${{ steps.get_next_version.outputs.tag }}
|
||||
body: ${{ steps.build_changelog.outputs.changelog }}
|
||||
|
||||
- name: Set success/fail flag
|
||||
|
Loading…
Reference in New Issue
Block a user