Skip to content

Commit b64874e

Browse files
authored
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
1 parent 44ece0c commit b64874e

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

44
name: Create package
5-
5+
permissions:
6+
contents: write
67
on:
78
push:
89
branches: [ "main" ]
@@ -23,17 +24,24 @@ jobs:
2324
python-version: '3.9' # Version range or exact version of a Python version to use, using SemVer's version range syntax
2425
cache: 'pip'
2526
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified - name: Install dependencies
27+
- uses: arduino/setup-protoc@v1
2628
- name: Install dependencies
2729
run: |
2830
python -m pip install --upgrade pip
29-
pip install build
31+
pip install build protoletariat
3032
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3133
- name: Compile python protobuf files
32-
run: |
33-
python compile.py
34+
run: python compile.py
35+
- name: Build package
36+
run: python -m build
37+
- name: Generate release tag
38+
id: tag
39+
run: echo "::set-output name=release_tag::Build_$(date +"%Y.%m.%d_%H-%M")"
3440
- name: Release
3541
uses: softprops/action-gh-release@v1
36-
if: startsWith(github.ref, 'refs/tags/')
3742
with:
38-
files: dist/cosmospy_protobuf-0.0.0.tar.gz
43+
tag_name: ${{ steps.tag.outputs.release_tag }}
44+
files: dist/*
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3947

compile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ def remove_all_compiled_python_files(directory):
6060

6161

6262
remove_all_compiled_python_files(package_name)
63-
#walk_through_project_and_compile_proto(package_name)
64-
#walk_through_project_and_fix_imports(package_name)
63+
walk_through_project_and_compile_proto(package_name)
64+
walk_through_project_and_fix_imports(package_name)

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
grpcio-tools ==1.46.3

0 commit comments

Comments
 (0)