npm and docker build and publish #18
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: npm and docker build and publish | |
on: | |
release: | |
types: [published] | |
jobs: | |
build-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install Depencencies | |
run: yarn install | |
- name: Build | |
run: yarn build:all | |
- name: Publish npm package | |
continue-on-error: true | |
run: yarn publish:anchor-tests | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Docker Login | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Install Latest npm Package | |
run: yarn add @stellar/anchor-tests@latest -W | |
- name: Build and push Docker images | |
uses: docker/[email protected] | |
with: | |
push: true | |
tags: stellar/anchor-tests:${{ github.event.release.tag_name }},stellar/anchor-tests:latest | |
file: Dockerfile |