2022-11-02 12:26:57 +00:00
|
|
|
name: Publish
|
2021-05-02 12:08:14 +00:00
|
|
|
|
|
|
|
on:
|
2021-05-02 12:10:53 +00:00
|
|
|
workflow_dispatch:
|
2021-05-02 12:08:14 +00:00
|
|
|
push:
|
2021-05-02 13:12:04 +00:00
|
|
|
tags:
|
2023-05-14 11:52:47 +00:00
|
|
|
- 'v*.*.*'
|
2021-05-02 12:08:14 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-05-14 11:52:47 +00:00
|
|
|
cli:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2023-05-25 21:29:05 +00:00
|
|
|
- uses: pnpm/action-setup@v2
|
2023-05-14 11:52:47 +00:00
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
2023-05-25 21:29:05 +00:00
|
|
|
cache: 'pnpm'
|
2023-05-14 11:52:47 +00:00
|
|
|
node-version-file: '.nvmrc'
|
2023-05-25 21:29:05 +00:00
|
|
|
registry-url: 'https://registry.npmjs.org'
|
2023-05-14 11:52:47 +00:00
|
|
|
|
|
|
|
- run: |
|
|
|
|
pnpm install --frozen-lockfile
|
|
|
|
pnpm run build
|
2023-05-25 21:54:59 +00:00
|
|
|
|
2023-05-25 21:29:05 +00:00
|
|
|
- run: npm publish
|
2023-05-25 21:54:59 +00:00
|
|
|
working-directory: ./packages/cli
|
2023-05-25 21:29:05 +00:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2023-05-14 11:52:47 +00:00
|
|
|
|
2021-05-02 12:08:14 +00:00
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-14 11:52:47 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: docker/setup-qemu-action@v2
|
|
|
|
- uses: docker/setup-buildx-action@v2
|
2021-05-19 09:29:33 +00:00
|
|
|
with:
|
|
|
|
install: true
|
2021-05-02 13:12:04 +00:00
|
|
|
- name: Docker Labels
|
|
|
|
id: meta
|
2023-05-14 11:52:47 +00:00
|
|
|
uses: docker/metadata-action@v4
|
2021-05-02 13:12:04 +00:00
|
|
|
with:
|
|
|
|
images: cupcakearmy/cryptgeon
|
|
|
|
tags: |
|
|
|
|
type=semver,pattern={{version}}
|
|
|
|
type=semver,pattern={{major}}.{{minor}}
|
2021-05-02 16:50:43 +00:00
|
|
|
type=semver,pattern={{major}}
|
2021-05-02 12:08:14 +00:00
|
|
|
- name: Login to DockerHub
|
2023-05-14 11:52:47 +00:00
|
|
|
uses: docker/login-action@v2
|
2021-05-02 12:08:14 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and push
|
2023-05-14 11:52:47 +00:00
|
|
|
uses: docker/build-push-action@v4
|
2021-05-02 12:08:14 +00:00
|
|
|
with:
|
2022-11-04 21:10:19 +00:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2021-05-02 12:08:14 +00:00
|
|
|
push: true
|
2021-05-02 13:12:04 +00:00
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|