From b64874e99d551fc88d7cdceffa88a8d49ba29656 Mon Sep 17 00:00:00 2001 From: Felix <62290842+ctrl-Felix@users.noreply.github.com> Date: Sun, 19 Jun 2022 22:10:59 +0200 Subject: [PATCH] Ctrl felix patch 1 (#3) * Update main.yml * Update compile.py * Update requirements.txt * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml --- .github/workflows/main.yml | 20 ++++++++++++++------ compile.py | 4 ++-- requirements.txt | 1 + 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8f38b968..659c798e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,8 @@ # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions name: Create package - +permissions: + contents: write on: push: branches: [ "main" ] @@ -23,17 +24,24 @@ jobs: python-version: '3.9' # Version range or exact version of a Python version to use, using SemVer's version range syntax cache: 'pip' architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified - name: Install dependencies + - uses: arduino/setup-protoc@v1 - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build + pip install build protoletariat if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Compile python protobuf files - run: | - python compile.py + run: python compile.py + - name: Build package + run: python -m build + - name: Generate release tag + id: tag + run: echo "::set-output name=release_tag::Build_$(date +"%Y.%m.%d_%H-%M")" - name: Release uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') with: - files: dist/cosmospy_protobuf-0.0.0.tar.gz + tag_name: ${{ steps.tag.outputs.release_tag }} + files: dist/* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/compile.py b/compile.py index 6e449ce0..82f4e91e 100644 --- a/compile.py +++ b/compile.py @@ -60,5 +60,5 @@ def remove_all_compiled_python_files(directory): remove_all_compiled_python_files(package_name) -#walk_through_project_and_compile_proto(package_name) -#walk_through_project_and_fix_imports(package_name) +walk_through_project_and_compile_proto(package_name) +walk_through_project_and_fix_imports(package_name) diff --git a/requirements.txt b/requirements.txt index e69de29b..3800edf7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1 @@ +grpcio-tools ==1.46.3 \ No newline at end of file