Skip to content

Commit

Permalink
Add yarn to the build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Babicaa committed Jul 11, 2023
1 parent d6b6678 commit 912cc7c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 15 deletions.
45 changes: 30 additions & 15 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
push:
tags:
- '*'

permissions:
contents: read

Expand All @@ -23,16 +8,46 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Install Yarn
run: npm install -g yarn

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Build React project
run: |
cd admin_gui
./build.sh
cd ..
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
graft std_daq_service/rest_v2/static
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
name='std_daq_service',
packages=['std_daq_service'],
version=version,
include_package_data=True,
install_requires=[
'std-buffer',
'pyzmq',
Expand Down

0 comments on commit 912cc7c

Please sign in to comment.