This repository has been archived by the owner on Jan 10, 2025. It is now read-only.
Initial Shooter #58
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Makefile CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
make_dashboard: | |
name: Build Dashboard | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
architecture: x64 | |
- run: sudo apt update | |
- run: sudo apt install curl | |
- name: Install NPM | |
run: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash | |
- name: Install npm deps | |
run: cd dashboard && npm ci | |
- id: cache-pipenv | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local/share/virtualenvs | |
key: ${{ runner.os }}-pipenv-${{ hashFiles('dashboard/Pipfile.lock') }} | |
- name: Install dependencies | |
if: steps.cache-pipenv.outputs.cache-hit != 'true' | |
run: | | |
cd dashboard && pipenv install --deploy --dev | |
- run: cd dashboard && pipenv run make stage | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: Dashboard_Transpiled | |
path: dashboard/dist | |
publish: | |
# Only run on tags | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
name: Publish | |
needs: [make_dashboard] | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: Dashboard_Transpiled | |
path: Dashboard_Transpiled/ | |
- uses: papeloto/action-zip@v1 | |
with: | |
files: Dashboard_Transpiled/ | |
dest: Dashboard_Transpiled.zip | |
- name: Upload Dashboard to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: "*.zip" | |
tag: ${{ github.ref }} | |
overwrite: true | |
prerelease: true | |
body: "Tidal Force Robotics, Automated with github ci/cd." | |
file_glob: true |