Merge pull request #60 from dan-tw/pre-v1.0.0-release #23
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: Scalable Pixel Streaming Frontend Tag Workflow Pipeline | |
# Start our pipeline when we create a new tag on the master branch | |
on: | |
push: | |
tags: | |
- '*' | |
# Assign an environment variable that we can use for the version of the Scalable Pixel Streaming Frontend that we are tagging | |
env: | |
VERSION: ${{ github.ref_name }} | |
DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_TOKEN: ${{ secrets.DOCKER_ACCESS_KEY }} | |
jobs: | |
# Build Library | |
build-library: | |
runs-on: ubuntu-latest | |
steps: | |
# remove unneeded pieces from runner to free up space | |
- name: Free up some space | |
run: | | |
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android | |
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET | |
# Clone the source code on the runner | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
# Login to Docker | |
- name: Docker login | |
run: docker login -u $DOCKER_USER -p $DOCKER_TOKEN | |
# Set up Node js for npm | |
- name: Setup Nodejs | |
uses: actions/setup-node@v3 | |
# Build the Scalable Pixel Streaming Frontend Library and Example | |
- name: Build SPS Frontend | |
run: | | |
cd ./examples/typescript | |
npm run build-all-prod | |
# Build the Scalable Pixel Streaming Frontend Docker image from the dist directories of the packages | |
- name: Build the Scalable Pixel Streaming Frontend Docker image and push to Docker | |
run: | | |
docker build -t "tensorworks/sps-frontend:$VERSION" -f ./dockerfiles/sps-frontend.dockerfile . | |
docker push "tensorworks/sps-frontend:$VERSION" |