first steps to move tests to github actions #1
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: Publish Teraslice NPM Packages, Documents and Docker Image | |
on: | |
pull_request: | |
branches: | |
- master | |
types: | |
- closed | |
jobs: | |
build-release: | |
runs-on: ubuntu-latest | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
steps: | |
- name: Register npm token | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
# we login to docker to publish new teraslice image | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.16.0 | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'yarn' | |
- name: Install and build packages | |
run: yarn setup | |
env: | |
YARN_SETUP_ARGS: "--prod=false --silent" | |
- name: Build documentation | |
run: ./scripts/publish-documentation.sh | |
- name: Publish to npm | |
run: yarn ts-scripts publish -t latest npm | |
- name: Publish to docker | |
run: yarn ts-scripts publish -t dev docker |