From db05538420fd8621a6ef0aa66c1e49563c808d83 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 16 May 2023 14:45:08 -0400 Subject: [PATCH 1/2] PILOT-2587: Condense deprecating github actions into a single, active, and maintained one --- .github/workflows/build-and-publish.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 7af02d06..8cf1f6ea 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -61,28 +61,21 @@ 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: Rename output file + run: mv "./app/bundled_app/linux/${{ github.sha }}" "./app/bundled_app/linux/pilotcli" + - 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 + uses: softprops/action-gh-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 }} + 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 }} - 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_content_type: application/octet-stream + files: ./app/bundled_app/linux/pilotcli \ No newline at end of file From 97bf68453a2d7f767daf7e895c8091e665c61eaf Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 16 May 2023 14:57:23 -0400 Subject: [PATCH 2/2] fix no newline at end of file issue with the build and publish workflow --- .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 8cf1f6ea..7d0a1262 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -78,4 +78,4 @@ jobs: body: ${{ github.event.head_commit.message }} draft: false prerelease: false - files: ./app/bundled_app/linux/pilotcli \ No newline at end of file + files: ./app/bundled_app/linux/pilotcli