From 79bd208428ccdd66892c60c3e423fa97e154e3df Mon Sep 17 00:00:00 2001 From: Tom-Oliver Heidel Date: Wed, 23 Sep 2020 04:10:28 +0200 Subject: [PATCH 1/6] [skip travis] apply version as tag name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 282720a8eca..432c047c98d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} + tag_name: ${{ steps.dump_version.outputs.ytdlc_version }} release_name: youtube-dlc ${{ steps.dump_version.outputs.ytdlc_version }} body: | Changelog: From ce02551b85f8e3ed41dcb570eac067ca4e3245d4 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 23 Sep 2020 04:43:02 +0200 Subject: [PATCH 2/6] [skip travis] alternative approach to datetime --- scripts/update-version-workflow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/update-version-workflow.py b/scripts/update-version-workflow.py index a61aa640b32..cebcbf1b4f4 100644 --- a/scripts/update-version-workflow.py +++ b/scripts/update-version-workflow.py @@ -18,7 +18,9 @@ if len(_OLD_VERSION) > 1: old_rev = _OLD_VERSION[1] -ver = f'{datetime.today():%Y.%m.%d}' +now = datetime.now() +# ver = f'{datetime.today():%Y.%m.%d}' +ver = now.strftime("%Y.%m.%d") rev = '' if old_ver == ver: From c74618a0c2b14a6e5fe3b0ac8a356149197b8448 Mon Sep 17 00:00:00 2001 From: Tom-Oliver Heidel Date: Wed, 23 Sep 2020 04:54:16 +0200 Subject: [PATCH 3/6] [skip travis] update workflow --- .github/workflows/build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 432c047c98d..08946909518 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,6 +26,8 @@ jobs: - name: Bump version id: bump_version run: python scripts/update-version-workflow.py + - name: Check the output from My action + run: echo "${{ steps.bump_version.outputs.ytdlc_version }}" - name: Run Make run: make - name: Create Release @@ -34,8 +36,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ steps.dump_version.outputs.ytdlc_version }} - release_name: youtube-dlc ${{ steps.dump_version.outputs.ytdlc_version }} + tag_name: ${{ steps.bump_version.outputs.ytdlc_version }} + release_name: youtube-dlc ${{ steps.bump_version.outputs.ytdlc_version }} body: | Changelog: PLACEHOLDER From 8a28bd24dd53bd506eca91e300c3085de7f40409 Mon Sep 17 00:00:00 2001 From: Tom-Oliver Heidel Date: Wed, 23 Sep 2020 04:59:58 +0200 Subject: [PATCH 4/6] [skip travis] publish right after unix build --- .github/workflows/build.yml | 41 ++++++++++++------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08946909518..669b41b15d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: - release jobs: - build_unix: + build_unix_and_deploy_pypi: runs-on: ubuntu-latest @@ -58,6 +58,18 @@ jobs: env: SHA2: ${{ hashFiles('youtube-dlc') }} run: echo "::set-output name=sha2_unix::${env:SHA2}" + - name: Install dependencies for pypi + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + rm -rf dist/* + python setup.py sdist bdist_wheel + twine upload dist/* build_windows: @@ -137,30 +149,3 @@ jobs: echo "$SHA2_WINDOWS youtube-dlc.exe" > SHA2-256SUMS echo "$SHA2_WINDOWS32 youtube-dlc32.exe" > SHA2-256SUMS echo "$SHA2_UNIX youtube-dlc" >> SHA2-256SUMS - - deploy: - - runs-on: ubuntu-latest - - needs: build_unix - - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Bump version - run: python scripts/update-version-workflow.py - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - rm -rf dist/* - python setup.py sdist bdist_wheel - twine upload dist/* From b33c48f2691e61c65317b42dc53f9696823907c5 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 23 Sep 2020 05:11:32 +0200 Subject: [PATCH 5/6] [skip travis] version bump --- youtube_dlc/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dlc/version.py b/youtube_dlc/version.py index eac5fabf1ae..738824201ed 100644 --- a/youtube_dlc/version.py +++ b/youtube_dlc/version.py @@ -1,3 +1,3 @@ from __future__ import unicode_literals -__version__ = '2020.09.16' +__version__ = '2020.09.23-1' From 93721ed09ccf68210a2bf18baa8761b5c1525a8e Mon Sep 17 00:00:00 2001 From: Tom-Oliver Heidel Date: Wed, 23 Sep 2020 05:14:17 +0200 Subject: [PATCH 6/6] [skip travis] typo --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 669b41b15d9..8db7e92f24c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: - release jobs: - build_unix_and_deploy_pypi: + build_unix: runs-on: ubuntu-latest