cryptgeon/.github/workflows/release.yml

59 lines
1.4 KiB
YAML
Raw Normal View History

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