From 0580777ee779df5ccd7c87d34da88411b76a88de Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:10:04 -0400 Subject: [PATCH 01/16] add new action for create mac binary --- .github/workflows/build-and-publish.yml | 108 +++++++++++++++++++++--- 1 file changed, 97 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 7af02d06..326d3326 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -5,11 +5,13 @@ on: workflows: [ "Run Tests" ] branches: - develop + - PILOT-2936 types: - completed push: branches: - main + - PILOT-2936 jobs: extract-branch-name: @@ -21,8 +23,29 @@ jobs: id: extract_branch shell: bash run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT - push-binary: + + + create-release: needs: [ extract-branch-name ] + if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' || needs.extract-branch-name.outputs.branch == 'PILOT-2936' }} + runs-on: ubuntu-20.04 + outputs: + upload_url: ${{steps.extract_branch.outputs.upload_url}} + steps: + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ env.TAG_VERSION }} + release_name: Release ${{ needs.extract-branch-name.outputs.branch }} ${{ env.TAG_VERSION }} + body: ${{ github.event.head_commit.message }} + draft: false + prerelease: false + + push-binary-linux: + needs: [ create-release ] if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' }} runs-on: ubuntu-20.04 steps: @@ -64,17 +87,80 @@ jobs: - name: Set version in env run: poetry run echo "TAG_VERSION=`poetry version --short`" >> $GITHUB_ENV - - name: Create Release - id: create_release - uses: actions/create-release@v1 + # - name: Create Release + # id: create_release + # uses: actions/create-release@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + # with: + # tag_name: ${{ env.TAG_VERSION }} + # release_name: Release ${{ needs.extract-branch-name.outputs.branch }} ${{ env.TAG_VERSION }} + # body: ${{ github.event.head_commit.message }} + # draft: false + # prerelease: false + + - name: Upload Release Binary + id: upload-release-binary + uses: actions/upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ env.TAG_VERSION }} - release_name: Release ${{ needs.extract-branch-name.outputs.branch }} ${{ env.TAG_VERSION }} - body: ${{ github.event.head_commit.message }} - draft: false - prerelease: false + upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./app/bundled_app/linux/${{ github.sha }} + asset_name: pilotcli + asset_content_type: application/octet-stream + + push-binary-macos: + needs: [ create-release, push-binary-linux ] + if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' || needs.extract-branch-name.outputs.branch == 'PILOT-2936' }} + runs-on: macos-12 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + ref: ${{ needs.extract-branch-name.outputs.branch }} + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9.16 + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: 1.3.2 + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + - name: Set up cache + id: cached-poetry-dependencies + uses: actions/cache@v3 + with: + path: .venv + key: venv-${{ hashFiles('**/poetry.lock') }} + + - name: Ensure cache is healthy + if: steps.cached-poetry-dependencies.outputs.cache-hit == 'true' + run: timeout 10s poetry run pip --version || rm -rf .venv + + - name: Install dependencies + run: poetry install --no-interaction --no-root + + - name: Build binary + run: poetry run pyinstaller -F --distpath ./app/bundled_app/macos --specpath ./app/build/macos --workpath ./app/build/macos --paths=./.venv/lib/python3.9/site-packages ./app/pilotcli.py -n ${{ github.sha }} + + # - name: Create Release + # id: create_release + # uses: actions/create-release@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + # with: + # tag_name: ${{ env.TAG_VERSION }} + # release_name: Release ${{ needs.extract-branch-name.outputs.branch }} ${{ env.TAG_VERSION }} + # body: ${{ github.event.head_commit.message }} + # draft: false + # prerelease: false - name: Upload Release Binary id: upload-release-binary @@ -82,7 +168,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./app/bundled_app/linux/${{ github.sha }} asset_name: pilotcli asset_content_type: application/octet-stream From 8c2395f2ab8066de774b4ab349d36d3897d84122 Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:11:44 -0400 Subject: [PATCH 02/16] add the tag name --- .github/workflows/build-and-publish.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 326d3326..09eb0de0 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -32,6 +32,9 @@ jobs: outputs: upload_url: ${{steps.extract_branch.outputs.upload_url}} steps: + - name: Set version in env + run: poetry run echo "TAG_VERSION=`poetry version --short`" >> $GITHUB_ENV + - name: Create Release id: create_release uses: actions/create-release@v1 @@ -84,8 +87,8 @@ jobs: - name: Build binary run: poetry run pyinstaller -F --distpath ./app/bundled_app/linux --specpath ./app/build/linux --workpath ./app/build/linux --paths=./.venv/lib/python3.9/site-packages ./app/pilotcli.py -n ${{ github.sha }} - - name: Set version in env - run: poetry run echo "TAG_VERSION=`poetry version --short`" >> $GITHUB_ENV + # - name: Set version in env + # run: poetry run echo "TAG_VERSION=`poetry version --short`" >> $GITHUB_ENV # - name: Create Release # id: create_release @@ -147,8 +150,8 @@ jobs: - name: Install dependencies run: poetry install --no-interaction --no-root - - name: Build binary - run: poetry run pyinstaller -F --distpath ./app/bundled_app/macos --specpath ./app/build/macos --workpath ./app/build/macos --paths=./.venv/lib/python3.9/site-packages ./app/pilotcli.py -n ${{ github.sha }} + # - name: Build binary + # run: poetry run pyinstaller -F --distpath ./app/bundled_app/macos --specpath ./app/build/macos --workpath ./app/build/macos --paths=./.venv/lib/python3.9/site-packages ./app/pilotcli.py -n ${{ github.sha }} # - name: Create Release # id: create_release From 6aaec360d4eb1b6c7383daa10478d2240a99c2e6 Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:14:49 -0400 Subject: [PATCH 03/16] add the python and poetry --- .github/workflows/build-and-publish.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 09eb0de0..f38f4717 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -32,6 +32,19 @@ jobs: outputs: upload_url: ${{steps.extract_branch.outputs.upload_url}} steps: + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9.16 + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: 1.3.2 + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + - name: Set version in env run: poetry run echo "TAG_VERSION=`poetry version --short`" >> $GITHUB_ENV From 8500c0c052f9085394ca9dd437ba7283741f6eab Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:18:14 -0400 Subject: [PATCH 04/16] output the release url in the linux step not in a dedicate step --- .github/workflows/build-and-publish.yml | 64 ++++++------------------- 1 file changed, 15 insertions(+), 49 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index f38f4717..c0a67ab1 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -24,46 +24,12 @@ jobs: shell: bash run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT - - create-release: + push-binary-linux: needs: [ extract-branch-name ] - if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' || needs.extract-branch-name.outputs.branch == 'PILOT-2936' }} + if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' }} runs-on: ubuntu-20.04 outputs: upload_url: ${{steps.extract_branch.outputs.upload_url}} - steps: - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.9.16 - - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - version: 1.3.2 - virtualenvs-create: true - virtualenvs-in-project: true - installer-parallel: true - - - name: Set version in env - run: poetry run echo "TAG_VERSION=`poetry version --short`" >> $GITHUB_ENV - - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ env.TAG_VERSION }} - release_name: Release ${{ needs.extract-branch-name.outputs.branch }} ${{ env.TAG_VERSION }} - body: ${{ github.event.head_commit.message }} - draft: false - prerelease: false - - push-binary-linux: - needs: [ create-release ] - if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' }} - runs-on: ubuntu-20.04 steps: - name: Checkout repository uses: actions/checkout@v3 @@ -100,20 +66,20 @@ jobs: - name: Build binary run: poetry run pyinstaller -F --distpath ./app/bundled_app/linux --specpath ./app/build/linux --workpath ./app/build/linux --paths=./.venv/lib/python3.9/site-packages ./app/pilotcli.py -n ${{ github.sha }} - # - name: Set version in env - # run: poetry run echo "TAG_VERSION=`poetry version --short`" >> $GITHUB_ENV + - name: Set version in env + run: poetry run echo "TAG_VERSION=`poetry version --short`" >> $GITHUB_ENV - # - name: Create Release - # id: create_release - # uses: actions/create-release@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - # with: - # tag_name: ${{ env.TAG_VERSION }} - # release_name: Release ${{ needs.extract-branch-name.outputs.branch }} ${{ env.TAG_VERSION }} - # body: ${{ github.event.head_commit.message }} - # draft: false - # prerelease: false + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ env.TAG_VERSION }} + release_name: Release ${{ needs.extract-branch-name.outputs.branch }} ${{ env.TAG_VERSION }} + body: ${{ github.event.head_commit.message }} + draft: false + prerelease: false - name: Upload Release Binary id: upload-release-binary From e0a27889176b1f03de5c51f8f0f7735adc3a6e3a Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:18:47 -0400 Subject: [PATCH 05/16] output the release url in the linux step not in a dedicate step --- .github/workflows/build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index c0a67ab1..9604116a 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -93,7 +93,7 @@ jobs: asset_content_type: application/octet-stream push-binary-macos: - needs: [ create-release, push-binary-linux ] + needs: [ push-binary-linux ] if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' || needs.extract-branch-name.outputs.branch == 'PILOT-2936' }} runs-on: macos-12 steps: From dc35cf1842964cca35d99110532f3978ff4c67c2 Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:19:51 -0400 Subject: [PATCH 06/16] output the release url in the linux step not in a dedicate step --- .github/workflows/build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 9604116a..6fabb79d 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -26,7 +26,7 @@ jobs: push-binary-linux: needs: [ extract-branch-name ] - if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' }} + if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' || needs.extract-branch-name.outputs.branch == 'PILOT-2936' }} runs-on: ubuntu-20.04 outputs: upload_url: ${{steps.extract_branch.outputs.upload_url}} From 0e72a788d30143cce2e0c98492ad800b8d9dfff4 Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:23:10 -0400 Subject: [PATCH 07/16] bumpup version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index da1a2b85..3cb17405 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "app" -version = "2.4.1" +version = "2.4.2" description = "This service is designed to support pilot platform" authors = ["Indoc Research"] From a3e47a706d05f23d5cfc4fa27361738742919ad5 Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:23:28 -0400 Subject: [PATCH 08/16] bumpup version --- app/resources/custom_help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/resources/custom_help.py b/app/resources/custom_help.py index 80cd4c4f..86da9d1d 100644 --- a/app/resources/custom_help.py +++ b/app/resources/custom_help.py @@ -6,7 +6,7 @@ class HelpPage: page = { 'update': { - 'version': '2.4.0', + 'version': '2.4.2', '1': 'The logic of normal upload and resumble are splited. ' 'add new command for resumable upload as `pilotcli file resume -r manifest.json`', '2': 'The manifest file will be output for both file/folder upload', From 6459b41e308cb6c3cf099eb4072a76e8029fd2ca Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:26:08 -0400 Subject: [PATCH 09/16] bumpup version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3cb17405..9dd01c78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "app" -version = "2.4.2" +version = "2.4.3" description = "This service is designed to support pilot platform" authors = ["Indoc Research"] From f214bca606ef7465d11982def8089e784b6dfc60 Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:28:42 -0400 Subject: [PATCH 10/16] fixup the upload_url --- .github/workflows/build-and-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 6fabb79d..74b1d128 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -87,7 +87,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ needs.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ needs.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./app/bundled_app/linux/${{ github.sha }} asset_name: pilotcli asset_content_type: application/octet-stream @@ -150,7 +150,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create-release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ needs.push-binary-linux.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./app/bundled_app/linux/${{ github.sha }} asset_name: pilotcli asset_content_type: application/octet-stream From 18bcfaee96aca2e04a6671dcdf1ecb753f6dabcd Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:31:06 -0400 Subject: [PATCH 11/16] fixup the upload_url --- .github/workflows/build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 74b1d128..ab8e49dc 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -87,7 +87,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ needs.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./app/bundled_app/linux/${{ github.sha }} asset_name: pilotcli asset_content_type: application/octet-stream From e38d41cd8f16a85332897343384110170fb131dc Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:36:04 -0400 Subject: [PATCH 12/16] fixup the upload_url --- .github/workflows/build-and-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index ab8e49dc..6f0e2bb9 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -29,7 +29,7 @@ jobs: if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' || needs.extract-branch-name.outputs.branch == 'PILOT-2936' }} runs-on: ubuntu-20.04 outputs: - upload_url: ${{steps.extract_branch.outputs.upload_url}} + upload_url: ${{steps.create_release.outputs.upload_url}} steps: - name: Checkout repository uses: actions/checkout@v3 From 0ccdc8923c2fac172d8ffe87d9972d23b61186c8 Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:36:53 -0400 Subject: [PATCH 13/16] use correct naming --- .github/workflows/build-and-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 6f0e2bb9..8e434829 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -89,7 +89,7 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./app/bundled_app/linux/${{ github.sha }} - asset_name: pilotcli + asset_name: pilotcli_linux asset_content_type: application/octet-stream push-binary-macos: @@ -152,5 +152,5 @@ jobs: with: upload_url: ${{ needs.push-binary-linux.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps asset_path: ./app/bundled_app/linux/${{ github.sha }} - asset_name: pilotcli + asset_name: pilotcli_macos asset_content_type: application/octet-stream From 67fcfbf5f184ff0389fa201851d026d15bde650b Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:41:21 -0400 Subject: [PATCH 14/16] add back build step --- .github/workflows/build-and-publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 8e434829..9718c720 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -129,8 +129,8 @@ jobs: - name: Install dependencies run: poetry install --no-interaction --no-root - # - name: Build binary - # run: poetry run pyinstaller -F --distpath ./app/bundled_app/macos --specpath ./app/build/macos --workpath ./app/build/macos --paths=./.venv/lib/python3.9/site-packages ./app/pilotcli.py -n ${{ github.sha }} + - name: Build binary + run: poetry run pyinstaller -F --distpath ./app/bundled_app/macos --specpath ./app/build/macos --workpath ./app/build/macos --paths=./.venv/lib/python3.9/site-packages ./app/pilotcli.py -n ${{ github.sha }} # - name: Create Release # id: create_release @@ -151,6 +151,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.push-binary-linux.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./app/bundled_app/linux/${{ github.sha }} + asset_path: ./app/bundled_app/macos/${{ github.sha }} asset_name: pilotcli_macos asset_content_type: application/octet-stream From c8283b4caee6b6b9a85b1e777a42cea97f96f276 Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:49:39 -0400 Subject: [PATCH 15/16] remove the test branch --- .github/workflows/build-and-publish.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 9718c720..f3afece7 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -5,7 +5,6 @@ on: workflows: [ "Run Tests" ] branches: - develop - - PILOT-2936 types: - completed push: @@ -26,7 +25,7 @@ jobs: push-binary-linux: needs: [ extract-branch-name ] - if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' || needs.extract-branch-name.outputs.branch == 'PILOT-2936' }} + if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop'}} runs-on: ubuntu-20.04 outputs: upload_url: ${{steps.create_release.outputs.upload_url}} @@ -94,7 +93,7 @@ jobs: push-binary-macos: needs: [ push-binary-linux ] - if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop' || needs.extract-branch-name.outputs.branch == 'PILOT-2936' }} + if: ${{ needs.extract-branch-name.outputs.branch == 'main' || needs.extract-branch-name.outputs.branch == 'develop'}} runs-on: macos-12 steps: - name: Checkout repository @@ -132,18 +131,6 @@ jobs: - name: Build binary run: poetry run pyinstaller -F --distpath ./app/bundled_app/macos --specpath ./app/build/macos --workpath ./app/build/macos --paths=./.venv/lib/python3.9/site-packages ./app/pilotcli.py -n ${{ github.sha }} - # - name: Create Release - # id: create_release - # uses: actions/create-release@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - # with: - # tag_name: ${{ env.TAG_VERSION }} - # release_name: Release ${{ needs.extract-branch-name.outputs.branch }} ${{ env.TAG_VERSION }} - # body: ${{ github.event.head_commit.message }} - # draft: false - # prerelease: false - - name: Upload Release Binary id: upload-release-binary uses: actions/upload-release-asset@v1 From 00ee2f6f87aa6c5ce0ed0ad22d51b3dc847c603e Mon Sep 17 00:00:00 2001 From: zhiren Date: Wed, 17 May 2023 15:59:39 -0400 Subject: [PATCH 16/16] bumpup version --- app/resources/custom_help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/resources/custom_help.py b/app/resources/custom_help.py index 86da9d1d..3dd4ec59 100644 --- a/app/resources/custom_help.py +++ b/app/resources/custom_help.py @@ -6,7 +6,7 @@ class HelpPage: page = { 'update': { - 'version': '2.4.2', + 'version': '2.4.3', '1': 'The logic of normal upload and resumble are splited. ' 'add new command for resumable upload as `pilotcli file resume -r manifest.json`', '2': 'The manifest file will be output for both file/folder upload',