mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-10 03:12:33 -05:00
Generate default LL server config and attach it to GH release (#6430)
This commit is contained in:
40
.github/workflows/publish_release.yml
vendored
40
.github/workflows/publish_release.yml
vendored
@@ -80,10 +80,38 @@ jobs:
|
||||
name: build-output
|
||||
path: ./dist
|
||||
|
||||
generate_default_ll_server_config:
|
||||
name: Generate default application.yml
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
- name: Install script's dependencies
|
||||
run: python -m pip install PyYAML
|
||||
|
||||
- name: Generate default application.yml
|
||||
env:
|
||||
APP_YML_FILE: "Red-DiscordBot-${{ github.ref_name }}-default-lavalink-application.yml"
|
||||
run: |
|
||||
mkdir -p dist
|
||||
python .github/workflows/scripts/get_default_ll_server_config.py "dist/$APP_YML_FILE"
|
||||
|
||||
- name: Upload default application.yml
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ll-default-server-config
|
||||
path: ./dist
|
||||
|
||||
release_to_pypi:
|
||||
needs:
|
||||
- release_information
|
||||
- build
|
||||
- generate_default_ll_server_config
|
||||
environment: Release
|
||||
name: Release to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
@@ -96,6 +124,18 @@ jobs:
|
||||
name: build-output
|
||||
path: dist/
|
||||
|
||||
- name: Download default application.yml
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ll-default-server-config
|
||||
path: dist/
|
||||
|
||||
- name: Upload dists to GitHub Release
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ github.token }}"
|
||||
run: |
|
||||
gh release upload "$GITHUB_REF_NAME" dist/*
|
||||
|
||||
- name: Publish package distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user