Skip to content

v0.55.1

v0.55.1 #288

name: Publish NPM Packages
on:
push:
tags:
- '*'
jobs:
publish-packages:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: Configure CI Git User
run: |
git config --global user.name 'Rajat Saxena'
git config --global user.email 'hi@sub.rajatsaxena.dev'
git remote set-url origin https://$GITHUB_ACTOR:$GITHUB_PAT@github.com/codelitdev/courselit
env:
GITHUB_PAT: ${{ secrets.PAT }}
- name: Checkout and pull branch
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $LATEST_TAG
- name: Install Packages
run: yarn install
- name: Authenticate with Registry
run: |
yarn npm logout
echo "npmAuthToken: $NPM_TOKEN" >> .yarnrc.yml
yarn npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM }}
- name: Build packages
run: |
yarn workspace @courselit/icons build
yarn workspace @courselit/common-models build
yarn workspace @courselit/utils build
yarn workspace @courselit/text-editor build
yarn workspace @courselit/state-management build
yarn workspace @courselit/components-library build
yarn workspace @courselit/common-widgets build
- name: Publish package
run: |
yarn publish
env:
GH_TOKEN: ${{ secrets.PAT }}
GITHUB_TOKEN: ${{ secrets.PAT }}
NPM_TOKEN: ${{ secrets.NPM }}
publish-docker-images:
needs: publish-packages
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: Checkout and pull branch
run: |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $LATEST_TAG
- name: Setup buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERNAME }}
password: ${{ secrets.DOCKERTOKEN }}
- name: Docker meta for the app
id: metaapp
uses: docker/metadata-action@v3
with:
images: codelit/courselit-app
- name: Docker meta for the proxy
id: metaproxy
uses: docker/metadata-action@v3
with:
images: codelit/courselit-proxy
- name: Docker meta for the queue
id: metaqueue
uses: docker/metadata-action@v3
with:
images: codelit/courselit-queue
- name: Build and push app
id: docker_build_app
uses: docker/build-push-action@v2
with:
context: .
file: ./services/app/Dockerfile
push: true
tags: ${{ steps.metaapp.outputs.tags }}
- name: Image digest
run: echo ${{ steps.docker_build_app.outputs.digest }}
- name: Build and push proxy
id: docker_build_proxy
uses: docker/build-push-action@v2
with:
context: .
file: ./services/proxy/Dockerfile
push: true
tags: ${{ steps.metaproxy.outputs.tags }}
- name: Image digest
run: echo ${{ steps.docker_build_proxy.outputs.digest }}
- name: Build and push queue
id: docker_build_queue
uses: docker/build-push-action@v2
with:
context: .
file: ./services/queue/Dockerfile
push: true
tags: ${{ steps.metaqueue.outputs.tags }}
- name: Image digest
run: echo ${{ steps.docker_build_queue.outputs.digest }}