Skip to content

Commit

Permalink
Merge pull request #6 from hypersign-protocol/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
arnabghose997 authored Nov 21, 2023
2 parents c446c7c + 6bd82a1 commit 787a057
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Dockerfile
.dockerignore
docker-compose.yml
./node_modules
.env
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Vault Service Build Workflow

on:
pull_request:
branches: [develop, master]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout into repo
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install packages
run: npm install

- name: Build studio-api
run: npm run build
83 changes: 83 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Vault Service Release Workflow

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]-rc.[0-9]+"

permissions:
contents: write
packages: write

jobs:
release-binaries-github:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: false
generate_release_notes: true

publish-docker:
name: Publish Docker Image (linux/amd64)
runs-on: ubuntu-latest
needs: release-binaries-github
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set Latest Tag
run: echo "LATEST_RELEASE_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
id: buildx
with:
version: latest

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

- name: Prepare Docker Metadata
id: docker-build
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository}}
flavor: |
latest=auto
tags: |
type=semver,pattern={{version}},value=${{ env.LATEST_RELEASE_TAG }}
labels: |
org.opencontainers.image.vendor="Hypermine Limited"
org.opencontainers.image.title="Hypersign Data Vault Service"
org.opencontainers.image.source="https://github.com/hypersign-protocol/hypersign-data-vault-service"
- name: Build and push image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.docker-build.outputs.tags }}
labels: ${{ steps.docker-build.outputs.labels }}
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:16
WORKDIR /usr/src/app
COPY ./package.json .
COPY ./tsconfig.json .
RUN npm install
COPY . .
CMD ["npm", "run", "start:dev"]






2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hypersign-vault",
"version": "v1.0.0",
"version": "v1.0.1",
"description": "",
"author": "",
"private": true,
Expand Down

0 comments on commit 787a057

Please sign in to comment.