Skip to content

Commit

Permalink
Merge branch '20-move-keygen-service' into 'dev'
Browse files Browse the repository at this point in the history
Resolve "move keygen-service to this repo"

Closes #20

See merge request ergo/rosen-bridge/sign-protocols!32
  • Loading branch information
vorujack committed Jul 1, 2024
2 parents d45371d + 9672a63 commit 9d78e83
Show file tree
Hide file tree
Showing 34 changed files with 12,322 additions and 1,896 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/keygen-service-docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build and Push Docker Image for Keygen Service

on:
push:
branches:
- dev
tags:
- keygen-service-*

jobs:
build:
name: Build and Push Docker Image
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ./services/keygen-service

steps:
- name: Checkout the Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Move the Files
run: |
npx @rosen-bridge/cli@${{ vars.ROSEN_CLI_VERSION || 'latest' }} download-tss -n linux -r -t tss-api -o ./bin/
mv ./docker/production.yaml ./config/
mv ./docker/custom-environment-variables.yaml ./config/
7z x ./bin/rosenTss-linux-* -obin/ && rm -rf ./bin/*.zip
mv ./bin/rosenTss-* ./bin/rosenTss
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: ${{ vars.PLATFORM_LIST || 'linux/amd64' }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: rosen-bridge
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker Metadata action
uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/rosen-bridge/keygen-service
tags: |
type=ref,event=branch
type=match,pattern=\d.\d.\d
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./services/keygen-service/Dockerfile
platforms: ${{ vars.PLATFORM_LIST || 'linux/amd64' }}
push: true
tags: ${{ steps.meta.outputs.tags }}
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Release
name: Release TSS API

on:
release:
types: [published]
push:
tags:
- tss-api-*

jobs:
build:
Expand All @@ -19,6 +20,7 @@ jobs:
platform: linux
- os: windows-latest
platform: windows
extension: '.exe'
defaults:
run:
shell: bash
Expand All @@ -38,14 +40,17 @@ jobs:
go-version: ${{ matrix.go }}

- name: Run build and prepare target files
id: build-version
run: |
CGO_ENABLED=0 go build -trimpath -o bin/rosenTss-${{ matrix.platform }}-${{ github.ref_name }}
match_version=$(echo "${{ github.ref_name }}" | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
echo "appVersion=${match_version}" >> $GITHUB_OUTPUT
CGO_ENABLED=0 go build -trimpath -o bin/rosenTss-${{ matrix.platform }}-${match_version}${{ matrix.extension }}
mkdir conf
mv conf.env.sample conf/conf.env
- name: Prepare Release File
run: |
7z a rosenTss-${{ matrix.platform }}-${{ github.ref_name }}.zip ./bin/rosenTss-${{ matrix.platform }}-${{ github.ref_name }} ./conf
7z a rosenTss-${{ matrix.platform }}-${{ steps.build-version.outputs.appVersion }}.zip ./bin/rosenTss-${{ matrix.platform }}-${{ steps.build-version.outputs.appVersion }}${{ matrix.extension }} ./conf
- name: Upload Release File
uses: softprops/action-gh-release@v1
Expand Down
4 changes: 3 additions & 1 deletion .gitlab/ts-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: node:20.10.0
image: node:20.11.0

stages:
- installation
Expand Down Expand Up @@ -30,6 +30,7 @@ type_check:
- '**/dist'
script:
- npm run type-check --workspace packages
- npm run type-check --workspace services/keygen-service

lint:
stage: lint
Expand All @@ -43,6 +44,7 @@ lint:
- '**/dist'
script:
- npm run lint --workspace packages
- npm run lint --workspace services/keygen-service

test:
stage: test
Expand Down
3 changes: 0 additions & 3 deletions babel.config.base.json

This file was deleted.

Loading

0 comments on commit 9d78e83

Please sign in to comment.