mirror of
https://github.com/ytdl-org/ytdl-nightly.git
synced 2024-12-24 22:11:48 +01: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:
parent
4ee3358dd3
commit
bc99a092d0
38
.github/workflows/build.yml
vendored
38
.github/workflows/build.yml
vendored
@ -6,12 +6,19 @@ on:
|
||||
build-commit:
|
||||
type: string
|
||||
required: true
|
||||
push-version-commit:
|
||||
type: boolean
|
||||
default: true
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
build-commit:
|
||||
description: 'SHA of commit being built'
|
||||
type: string
|
||||
required: false
|
||||
push-version-commit:
|
||||
description: 'Update master if set'
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
jobs:
|
||||
build_unix:
|
||||
@ -26,8 +33,10 @@ jobs:
|
||||
sha512_tar: ${{ steps.sha512_tar.outputs.sha512_tar }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check out
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: refs/heads/master
|
||||
fetch-depth: 0
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
@ -43,12 +52,22 @@ jobs:
|
||||
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+]}"
|
||||
echo "Version = $ytdl_version${sha+ [}${sha}${sha+]}"
|
||||
make issuetemplates
|
||||
- name: Push to release
|
||||
id: push_release
|
||||
run: echo "head_sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||
- name: Get Changelog
|
||||
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
|
||||
id: get_changelog
|
||||
run: |
|
||||
changelog=$(cat Changelog.md | grep -oPz '(?s)(?<=### ${{ steps.bump_version.outputs.ytdl_version }}\n{2}).+?(?=\n{2,3}###)') || true
|
||||
@ -114,6 +133,8 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: refs/heads/release
|
||||
# reason to choose 3.4: https://media.discordapp.net/attachments/807245652072857613/942409077701619742/unknown.png
|
||||
- name: Set up Python 3.4
|
||||
uses: actions/setup-python@v4
|
||||
@ -126,15 +147,6 @@ jobs:
|
||||
# https://pip.pypa.io/en/stable/news/#v19-2
|
||||
# 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
|
||||
- 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
|
||||
# run: python -m PyInstaller --onefile --console --distpath dist/ -n youtube-dl youtube_dl\__main__.py
|
||||
- name: Cache PyCrypto
|
||||
|
Loading…
Reference in New Issue
Block a user