Make experimental always be ran no matter what. #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create experimental release | |
on: | |
push: | |
branches: | |
- 'main' | |
permissions: | |
contents: write | |
jobs: | |
python: | |
if: ${{ github.repository == 'team-nameless/nameless-discord-bot' }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
cache-dependency-path: | | |
**/requirements*.txt | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install --upgrade setuptools wheel | |
pip install -U -r requirements_core.txt -r requirements_dev.txt | |
- name: Create dummy config file | |
run: | | |
cp NamelessConfig_example.py NamelessConfig.py | |
- name: Fix the code with ruff | |
run: | | |
ruff check --select I --fix --exit-zero . | |
ruff check --select UP --fix --exit-zero . | |
ruff check --fix --exit-zero . | |
ruff format . | |
- name: Type checking with PyWrong | |
run: | | |
pyright | |
- name: Update nameless version file with the --version flag | |
run: | | |
python -m main --version | |
python -m main -v | |
- name: Delete the dummy config file | |
run: | | |
rm NamelessConfig.py | |
- name: Push the changes if needed. | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "[ci skip] Automated code format commit." | |
release: | |
if: ${{ github.repository == 'team-nameless/nameless-discord-bot' && always() }} | |
runs-on: ubuntu-latest | |
needs: [ "python" ] | |
steps: | |
- name: Create cutting-edge release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "experimental" | |
prerelease: true | |
title: "Cutting-edge release of nameless*" |