Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage artifacts during CI run #17

Merged
merged 10 commits into from
Dec 6, 2023
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ on:
jobs:
check_protos:
name: Check .proto files
uses: ./.github/workflows/check_protos.yml
uses: ./.github/workflows/check_protos.yml
create_ci_artifacts:
dixonjoel marked this conversation as resolved.
Show resolved Hide resolved
uses: ./.github/workflows/create_ci_artifacts.yml

49 changes: 49 additions & 0 deletions .github/workflows/create_ci_artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Create CI Artifacts

on:
workflow_call:
workflow_dispatch:

env:
POETRY_VERSION: 1.2.2
PYTHON_VERSION: 3.9

jobs:
build:
name: 'Proto Artifacts'
runs-on: 'ubuntu-latest'

steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Setup python3
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Set up Poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: ${{ env.POETRY_VERSION }}
- name: Cache virtualenv
uses: actions/cache@v3
with:
path: .github/check_protos/.venv
key: create-artifacts-${{ runner.os }}-py${{ env.PYTHON_VERSION }}-${{ hashFiles('.github/artifacts/poetry.lock') }}
dixonjoel marked this conversation as resolved.
Show resolved Hide resolved

- name: Create staging directory
run: |
mkdir -p ${{ runner.temp }}/staging/ni

- name: Stage Client Files
dixonjoel marked this conversation as resolved.
Show resolved Hide resolved
run: |
rsync -av --prune-empty-dirs --include "*/" --include "*.proto" --exclude "*" ni/ ${{ runner.temp }}/staging/ni/
dixonjoel marked this conversation as resolved.
Show resolved Hide resolved

- name: Upload Windows Client Files Artifact
dixonjoel marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/upload-artifact@v2
with:
name: ni-apis
path: |
${{ runner.temp }}/staging/ni
retention-days: 5