[version] add __variant__
Specifies origin and OS of executable files. For example 'stable/windows'.
This commit is contained in:
10
.github/workflows/executables.yml
vendored
10
.github/workflows/executables.yml
vendored
@@ -42,7 +42,9 @@ jobs:
|
||||
architecture: ${{ matrix.architecture }}
|
||||
|
||||
- name: Date
|
||||
run: echo "DATE=$(date '+${{ env.DATE_FORMAT }}')" >> "$GITHUB_ENV"
|
||||
run: |
|
||||
echo "DATE=$(date '+${{ env.DATE_FORMAT }}')" >> "$GITHUB_ENV"
|
||||
echo "LABEL=$(python ./scripts/pyinstaller.py --print --os '${{ matrix.os }}' --arch '${{ matrix.architecture }}')" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Update Version
|
||||
# use Python since its behavior is consistent across operating systems
|
||||
@@ -56,13 +58,17 @@ jobs:
|
||||
r'\b(__version__ = "[^"]+)',
|
||||
r"\1:${{ env.DATE }}",
|
||||
content)
|
||||
content = re.sub(
|
||||
r'\b(__variant__ =).+',
|
||||
r'\1 "dev/${{ env.LABEL }}"',
|
||||
content)
|
||||
with open(path, "w") as fp:
|
||||
fp.write(content)
|
||||
|
||||
- name: Build executable
|
||||
run: |
|
||||
pip install requests requests[socks] yt-dlp pyyaml ${{ matrix.python-packages }} pyinstaller
|
||||
python ./scripts/pyinstaller.py --os '${{ matrix.os }}' --arch '${{ matrix.architecture }}'
|
||||
python ./scripts/pyinstaller.py --label '${{ env.LABEL }}'
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user