Skip to content

Commit d23dd9d

Browse files
authored
Merge branch 'master' into optional-option
Signed-off-by: Lumouille <[email protected]>
2 parents ad80686 + 76f91b0 commit d23dd9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+837
-166
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
language: ["python"]
2727
steps:
2828
- name: "Checkout repository"
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v5
3030
- name: "Initialize CodeQL"
3131
uses: github/codeql-action/init@v3
3232
with:

.github/workflows/docs-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ubuntu-latest
3737
steps:
3838
- name: "Checkout Repository"
39-
uses: actions/checkout@v4
39+
uses: actions/checkout@v5
4040
- name: "Setup Python"
4141
uses: actions/setup-python@v5
4242
with:

.github/workflows/docs-localization-download.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
pr_id: ${{ steps.convert_outputs.outputs.pr_id }}
1616
steps:
1717
- name: "Checkout Repository"
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v5
1919
with:
2020
fetch-tags: true
2121
- name: "Install Python"
@@ -40,7 +40,7 @@ jobs:
4040
working-directory: ./docs
4141
- name: "Crowdin"
4242
id: crowdin
43-
uses: crowdin/github-action@v2.9.1
43+
uses: crowdin/github-action@v2.10.0
4444
with:
4545
upload_sources: false
4646
upload_translations: false
@@ -74,7 +74,7 @@ jobs:
7474
environment: translations
7575
steps:
7676
- name: "Checkout Repository"
77-
uses: actions/checkout@v4
77+
uses: actions/checkout@v5
7878
- name: "Refresh Pull"
7979
run: |
8080
git fetch --all

.github/workflows/docs-localization-upload.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
environment: translations
2121
steps:
2222
- name: "Checkout Repository"
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2424
with:
2525
fetch-tags: true
2626
- name: "Install Python"
@@ -44,7 +44,7 @@ jobs:
4444
sphinx-intl update -p ./build/locales ${{ vars.SPHINX_LANGUAGES }}
4545
working-directory: ./docs
4646
- name: "Crowdin"
47-
uses: crowdin/github-action@v2.9.1
47+
uses: crowdin/github-action@v2.10.0
4848
with:
4949
upload_sources: true
5050
upload_translations: false

.github/workflows/lib-checks.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- name: "Checkout Repository"
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@v5
3636
- name: "Setup Python"
3737
uses: actions/setup-python@v5
3838
with:
@@ -52,7 +52,7 @@ jobs:
5252
runs-on: ubuntu-latest
5353
steps:
5454
- name: "Checkout Repository"
55-
uses: actions/checkout@v4
55+
uses: actions/checkout@v5
5656
- name: "Setup Python"
5757
uses: actions/setup-python@v5
5858
with:
@@ -70,7 +70,7 @@ jobs:
7070
runs-on: ubuntu-latest
7171
steps:
7272
- name: "Checkout Repository"
73-
uses: actions/checkout@v4
73+
uses: actions/checkout@v5
7474
- name: "Setup Python"
7575
uses: actions/setup-python@v5
7676
with:
@@ -94,7 +94,7 @@ jobs:
9494
runs-on: ubuntu-latest
9595
steps:
9696
- name: "Checkout Repository"
97-
uses: actions/checkout@v4
97+
uses: actions/checkout@v5
9898
- name: "Setup Python"
9999
uses: actions/setup-python@v5
100100
with:
@@ -131,7 +131,7 @@ jobs:
131131
PYTHON: ${{ matrix.python-version }}
132132
steps:
133133
- name: "Checkout Repository"
134-
uses: actions/checkout@v4
134+
uses: actions/checkout@v5
135135
- name: "Setup Python"
136136
uses: actions/setup-python@v5
137137
with:

.github/workflows/pr-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: "Check Semantic Pull Request"
28-
uses: amannn/action-semantic-pull-request@v5.5.3
28+
uses: amannn/action-semantic-pull-request@v6.1.1
2929
env:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- name: "Checkout Repository"
34-
uses: actions/checkout@v4
34+
uses: actions/checkout@v5
3535
with:
3636
fetch-depth: 0
3737
fetch-tags: true
@@ -66,11 +66,23 @@ jobs:
6666
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6767
steps:
6868
- name: "Checkout Repository"
69-
uses: actions/checkout@v4
69+
uses: actions/checkout@v5
7070
with:
7171
fetch-depth: 0
7272
fetch-tags: true
73-
73+
- name: "Create version branch if missing"
74+
id: conditional-create-version-branch
75+
shell: bash
76+
env:
77+
VERSION_BRANCH: ${{ needs.pre_config.outputs.branch_name }}
78+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
run: |
80+
git fetch origin
81+
if ! git show-ref --verify --quiet refs/heads/$VERSION_BRANCH; then
82+
git checkout -b $VERSION_BRANCH
83+
git push origin $VERSION_BRANCH
84+
fi
85+
git checkout $VERSION_BRANCH
7486
- name: "Release Pycord"
7587
id: pycord-release
7688
uses: Aiko-IT-Systems/[email protected]
@@ -92,7 +104,7 @@ jobs:
92104
docs_release:
93105
runs-on: ubuntu-latest
94106
needs: [lib_release,pre_config]
95-
if: needs.pre_config.outputs.is_rc == 'false' || (needs.pre_config.outputs.is_rc == 'true' && endsWith(needs.pre_config.outputs.version, '.0-rc1'))
107+
if: ${{ needs.pre_config.outputs.is_rc == 'false' || (needs.pre_config.outputs.is_rc == 'true' && endsWith(needs.pre_config.outputs.version, '.0-rc.1')) }}
96108
environment: release
97109
steps:
98110
- name: "Sync Versions on Read the Docs"
@@ -105,11 +117,10 @@ jobs:
105117
run: |
106118
VERSION=${{ needs.pre_config.outputs.version }}
107119
MAJOR_MINOR_VERSION=$(echo $VERSION | grep -oE '^[0-9]+\.[0-9]+')
108-
PATCH_VERSION=${VERSION##*.}
109-
if [[ $PATCH_VERSION =~ ^[0-9]+$ ]]; then
110-
DOCS_VERSION="v$VERSION"
120+
if [[ $VERSION == *-rc* ]]; then
121+
DOCS_VERSION="v${MAJOR_MINOR_VERSION}.x"
111122
else
112-
DOCS_VERSION="v$MAJOR_MINOR_VERSION.x"
123+
DOCS_VERSION="v$VERSION"
113124
fi
114125
curl --location --request PATCH "https://readthedocs.org/api/v3/projects/pycord/versions/$DOCS_VERSION/" \
115126
--header 'Content-Type: application/json' \
@@ -128,24 +139,37 @@ jobs:
128139
run: |
129140
VERSION=${{ needs.pre_config.outputs.version }}
130141
MAJOR_MINOR_VERSION=$(echo $VERSION | grep -oE '^[0-9]+\.[0-9]+')
131-
DOCS_URL="<https://docs.pycord.dev/en/v$VERSION/changelog.html>"
142+
if [[ $VERSION == *-rc* ]]; then
143+
DOCS_URL="<https://docs.pycord.dev/en/v${MAJOR_MINOR_VERSION}.x/changelog.html>"
144+
else
145+
DOCS_URL="<https://docs.pycord.dev/en/v$VERSION/changelog.html>"
146+
fi
132147
GITHUB_COMPARE_URL="<https://github.com/Pycord-Development/pycord/compare/${{ needs.pre_config.outputs.previous_tag }}...v$VERSION>"
133148
GITHUB_RELEASE_URL="<https://github.com/Pycord-Development/pycord/releases/tag/v$VERSION>"
134149
PYPI_RELEASE_URL="<https://pypi.org/project/py-cord/$VERSION/>"
135-
ANNOUNCEMENT="## <:pycord:1063211537008955495> Pycord v${MAJOR_MINOR_VERSION} is out!\n\n"
136-
ANNOUNCEMENT="${ANNOUNCEMENT}[@everyone]\n\n"
137-
ANNOUNCEMENT="${ANNOUNCEMENT}You can view the changelog here: <$DOCS_URL>\n\n"
138-
ANNOUNCEMENT="${ANNOUNCEMENT}Feel free to take a look at the [GitHub changelog]($GITHUB_COMPARE_URL), [GitHub release page]($GITHUB_RELEASE_URL) and the [PyPI release page]($PYPI_RELEASE_URL).\n\n"
139-
ANNOUNCEMENT="${ANNOUNCEMENT}You can install this version by running the following command:\n\`\`\`sh\npip install -U py-cord==$VERSION\n\`\`\`\n\n"
150+
if [[ $VERSION == *-rc* ]]; then
151+
ANNOUNCEMENT="## <:pycord:1063211537008955495> Pycord v${MAJOR_MINOR_VERSION} Release Candidate ($VERSION) is available!\n\n"
152+
ANNOUNCEMENT="${ANNOUNCEMENT}This is a pre-release (release candidate) for testing and feedback.\n\n"
153+
ANNOUNCEMENT="${ANNOUNCEMENT}You can view the changelog here: <$DOCS_URL>\n\n"
154+
ANNOUNCEMENT="${ANNOUNCEMENT}Check out the [GitHub changelog]($GITHUB_COMPARE_URL), [GitHub release page]($GITHUB_RELEASE_URL), and [PyPI release page]($PYPI_RELEASE_URL).\n\n"
155+
ANNOUNCEMENT="${ANNOUNCEMENT}You can install this version by running the following command:\n\`\`\`sh\npip install -U py-cord==$VERSION\n\`\`\`\n\n"
156+
ANNOUNCEMENT="${ANNOUNCEMENT}Please try it out and let us know your feedback or any issues!\n@here"
157+
else
158+
ANNOUNCEMENT="## <:pycord:1063211537008955495> Pycord v${MAJOR_MINOR_VERSION} is out!\n\n"
159+
ANNOUNCEMENT="${ANNOUNCEMENT}[@everyone]\n\n"
160+
ANNOUNCEMENT="${ANNOUNCEMENT}You can view the changelog here: <$DOCS_URL>\n\n"
161+
ANNOUNCEMENT="${ANNOUNCEMENT}Feel free to take a look at the [GitHub changelog]($GITHUB_COMPARE_URL), [GitHub release page]($GITHUB_RELEASE_URL) and the [PyPI release page]($PYPI_RELEASE_URL).\n\n"
162+
ANNOUNCEMENT="${ANNOUNCEMENT}You can install this version by running the following command:\n\`\`\`sh\npip install -U py-cord==$VERSION\n\`\`\`\n\n"
163+
fi
140164
curl -H "Content-Type: application/json" \
141165
-X POST \
142-
-d "{\"content\":\"$ANNOUNCEMENT\"}" \
166+
-d "{\"content\":\"$ANNOUNCEMENT\",\"allowed_mentions\":{\"parse\": [\"everyone\"]}}" \
143167
${{ secrets.DISCORD_WEBHOOK_URL }}
144168
145169
determine_milestone_id:
146170
runs-on: ubuntu-latest
147171
needs: [lib_release,pre_config]
148-
if: ${{ !contains(needs.pre_config.outputs.version, '-') && endsWith(needs.pre_config.outputs.version, '.0') }}
172+
if: ${{ !contains(needs.pre_config.outputs.version, '-') }}
149173
outputs:
150174
old_milestone_version: ${{ steps.extract_version.outputs.old_milestone_version }}
151175
new_milestone_version: ${{ steps.extract_version.outputs.new_milestone_version }}
@@ -158,7 +182,8 @@ jobs:
158182
run: |
159183
gh extension install valeriobelli/gh-milestone
160184
VERSION=${{ needs.pre_config.outputs.version }}
161-
OLD_MILESTONE_VERSION=$(gh milestone list --query "v2.7" | grep "#" | awk '{print $2}')
185+
PREV_MAJOR_MINOR=$(echo $VERSION | awk -F. '{printf "v%d.%d", $1, $2-1}')
186+
OLD_MILESTONE_VERSION=$(gh milestone list --query "$PREV_MAJOR_MINOR" | grep "#" | awk '{print $2}')
162187
NEW_MILESTONE_VERSION="v$(echo $VERSION | grep -oE '^[0-9]+\.[0-9]+')"
163188
echo "old_milestone_version=$OLD_MILESTONE_VERSION" >> $GITHUB_OUTPUT
164189
echo "new_milestone_version=$NEW_MILESTONE_VERSION" >> $GITHUB_OUTPUT
@@ -172,7 +197,7 @@ jobs:
172197
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
173198
steps:
174199
- name: "Checkout Repository"
175-
uses: actions/checkout@v4
200+
uses: actions/checkout@v5
176201
with:
177202
fetch-depth: 0
178203
fetch-tags: true

.github/workflows/todo-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: "Checkout Repository"
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v5
2525
- name: "Track TODO Action"
2626
uses: ribtoks/[email protected]
2727
with:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ cython_debug/
159159

160160
# Custom
161161
*.json
162+
!renovate.json
162163
*.egg-info
163164
.venv/
164165
docs/_build
@@ -192,3 +193,4 @@ docs/build/linkcheck
192193
!docs/locales/*
193194
/build/
194195
/vscode/
196+
remote-release.yml

0 commit comments

Comments
 (0)