mirror of
https://github.com/ytdl-org/ytdl-nightly.git
synced 2025-06-05 21:49:13 +02:00
[workflows/build.yml] Revise build for nightly
* Check out explicit HEAD * Actually commit released version * Fix explicit checkout branches
This commit is contained in:
34
.github/workflows/build.yml
vendored
34
.github/workflows/build.yml
vendored
@@ -6,12 +6,19 @@ on:
|
|||||||
build-commit:
|
build-commit:
|
||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
|
push-version-commit:
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
build-commit:
|
build-commit:
|
||||||
description: 'SHA of commit being built'
|
description: 'SHA of commit being built'
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
push-version-commit:
|
||||||
|
description: 'Update master if set'
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_unix:
|
build_unix:
|
||||||
@@ -26,8 +33,10 @@ jobs:
|
|||||||
sha512_tar: ${{ steps.sha512_tar.outputs.sha512_tar }}
|
sha512_tar: ${{ steps.sha512_tar.outputs.sha512_tar }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Check out
|
||||||
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
ref: refs/heads/master
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
@@ -47,7 +56,17 @@ jobs:
|
|||||||
make issuetemplates
|
make issuetemplates
|
||||||
- name: Push to release
|
- name: Push to release
|
||||||
id: push_release
|
id: push_release
|
||||||
run: echo "head_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
run: |
|
||||||
|
git config --global user.name github-actions
|
||||||
|
git config --global user.email github-actions@example.com
|
||||||
|
git add -u
|
||||||
|
git commit -m "Release (nightly) ${{ steps.update_version.outputs.version }}" \
|
||||||
|
-m "Created by: ${{ github.event.sender.login }}" -m ":ci skip all"
|
||||||
|
git push origin --force master:release
|
||||||
|
echo "head_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||||
|
- name: Update master
|
||||||
|
if: ${{ inputs.push-version-commit }}
|
||||||
|
run: git push origin master
|
||||||
- name: Get Changelog
|
- name: Get Changelog
|
||||||
id: get_changelog
|
id: get_changelog
|
||||||
run: |
|
run: |
|
||||||
@@ -114,6 +133,8 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: refs/heads/release
|
||||||
# reason to choose 3.4: https://media.discordapp.net/attachments/807245652072857613/942409077701619742/unknown.png
|
# reason to choose 3.4: https://media.discordapp.net/attachments/807245652072857613/942409077701619742/unknown.png
|
||||||
- name: Set up Python 3.4
|
- name: Set up Python 3.4
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
@@ -126,15 +147,6 @@ jobs:
|
|||||||
# https://pip.pypa.io/en/stable/news/#v19-2
|
# https://pip.pypa.io/en/stable/news/#v19-2
|
||||||
# https://wheel.readthedocs.io/en/stable/news.html
|
# https://wheel.readthedocs.io/en/stable/news.html
|
||||||
run: python -m pip install --upgrade "pip<19.2" "setuptools<44" "wheel<0.34.0" py2exe==0.9.2.2
|
run: python -m pip install --upgrade "pip<19.2" "setuptools<44" "wheel<0.34.0" py2exe==0.9.2.2
|
||||||
- name: Bump version
|
|
||||||
id: bump_version
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
ytdl_version=$(python devscripts/update-version.py)
|
|
||||||
sha=${{ inputs.build-commit }}
|
|
||||||
sed -i -rn -e '/^ *RELEASE_GIT_HEAD *=/z;$s/$/&'"\nRELEASE_GIT_HEAD = '${sha}'/;p" youtube_dl/version.py
|
|
||||||
x=${sha#?????????}; sha=${sha%$x}
|
|
||||||
echo "Version = $ytdl_version${sha+[ }${sha}${sha+]}"
|
|
||||||
# - name: Run PyInstaller Script
|
# - name: Run PyInstaller Script
|
||||||
# run: python -m PyInstaller --onefile --console --distpath dist/ -n youtube-dl youtube_dl\__main__.py
|
# run: python -m PyInstaller --onefile --console --distpath dist/ -n youtube-dl youtube_dl\__main__.py
|
||||||
- name: Cache PyCrypto
|
- name: Cache PyCrypto
|
||||||
|
Reference in New Issue
Block a user