Skip to content

chore(release): publish #84

chore(release): publish

chore(release): publish #84

Workflow file for this run

name: CI
on:
push:
branches: ['main']
jobs:
publish:
if: "contains(github.event.head_commit.message, 'chore(release): publish')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: https://registry.npmjs.org/
- name: publish
run: |
npm ci
npm run publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
publish-image:
if: "contains(github.event.head_commit.message, 'chore(release): publish') || contains(github.event.head_commit.message, 'chore(release): image')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.HUB_DOCKER_USERNAME }}
password: ${{ secrets.HUB_DOCKER_PASSWORD }}
- name: Get CLI version
id: get-version
uses: beaconbrigade/[email protected]
with:
path: packages/cli/
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: eyevinntechnology/osccli
tags: |
latest
${{ steps.get-version.outputs.version }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}