Skip to content

Clean menu

Clean menu #610

Workflow file for this run

name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
# https://yarnpkg.com/features/release-workflow/#ensuring-that-versions-are-bumped-ci
fetch-depth: 0
- name: use Node.js
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Check if commit includes version information
# Run `yarn version check --interactive` before committing
if: contains(github.ref, 'master')
run: yarn version check
# - name: set checksum behavior
# run: set -x YARN_CHECKSUM_BEHAVIOR update
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install Dependencies
run: yarn
- name: Lint
run: yarn eslint
- name: Build
run: yarn build
- name: Publish if versioned
if: contains(github.ref, 'master')
run: yarn publish
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH }}
- name: Publish if versioned
if: contains(github.ref, 'master')
run: yarn publish
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH }}
# docker:
# runs-on: ubuntu-latest
# steps:
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_USER }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# -
# name: Build and push
# uses: docker/build-push-action@v3
# with:
# push: true
# tags: user/app:latest
# env:
# DOCKER_USER: ${{ secrets.DOCKER_USER }}
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# push-image-to-docker-hub:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2 # first action : checkout source code
# - name: docker publish
# run: | # log into docker hub account
# docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
# # Set this to your package name
# # You can also source this from the ENV and share this script between packages
# GIT_COMMIT_HASH=$(git rev-parse HEAD)
# # Make a tmp directory to extract out bundle to
# # this helps removes everything thats not needed before
# # we even send stuff over to the docker build context
# dirName="$GITHUB_REPOSITORY-${GIT_COMMIT_HASH}"
# # Make the tmp directory and capture it's path
# tmpDir=$(mktemp -d -t $dirName-XXXXXXX)
# NODE_OPTIONS=--trace-warnings
# # Run bundle with our tmp directory, and ask it not to zip up the result
# yarn bundle --temporary-directory $tmpDir
# set -e
# # Build our container using the tmp directory
# docker build \
# -t $GITHUB_REPOSITORY:${GIT_COMMIT_HASH} \
# --compress \
# -f $tmpDir$INIT_CWD/Dockerfile \
# $tmpDir
# set +e
# # Tag our new image with the package and version
# docker tag $GITHUB_REPOSITORY:${GIT_COMMIT_HASH} ${REGISTRY_URL}/$GITHUB_REPOSITORY:${GIT_COMMIT_HASH}
# # Remove our temporary directory
# rm -rf $tmpDir
# # Push the image up
# docker push $GITHUB_REPOSITORY:${GIT_COMMIT_HASH}