From c10a9ca52eadcbb5e4c4c09c856c2a161fb3bd3c Mon Sep 17 00:00:00 2001 From: devleejb Date: Mon, 12 Aug 2024 17:09:40 +0900 Subject: [PATCH 1/3] Update `package.json` to apply version --- backend/package.json | 10 +++++----- frontend/package.json | 7 +++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/backend/package.json b/backend/package.json index 7d7ea753..2b8b00ea 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,10 +1,10 @@ { - "name": "backend", - "version": "0.0.1", - "description": "", - "author": "", + "name": "codepair-backend", + "version": "0.1.0", + "description": "CodePair Backend", + "author": "yorkie-team", "private": true, - "license": "UNLICENSED", + "license": "Apache-2.0", "scripts": { "build": "nest build", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", diff --git a/frontend/package.json b/frontend/package.json index cbc8b8a2..d8acd437 100755 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,8 +1,11 @@ { - "name": "frontend", + "name": "codepair-frontend", + "description": "CodePair Frontend", "private": true, - "version": "0.0.0", + "version": "0.1.0", "type": "module", + "author": "yorkie-team", + "license": "Apache-2.0", "scripts": { "dev": "vite", "build": "tsc && vite build", From 9da3411be96dd83fc18f13f219ccd014b6aaabe8 Mon Sep 17 00:00:00 2001 From: devleejb Date: Mon, 12 Aug 2024 17:35:33 +0900 Subject: [PATCH 2/3] Add publish GitHub Actions for release --- .github/workflows/docker-publish.yaml | 10 ++++++++++ .github/workflows/gh_pages.yaml | 9 ++++----- 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/docker-publish.yaml diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml new file mode 100644 index 00000000..714b6926 --- /dev/null +++ b/.github/workflows/docker-publish.yaml @@ -0,0 +1,10 @@ +name: docker-publish +on: + release: + types: [published] +jobs: + call-base-docker-publish: + uses: ./.github/workflows/base-docker-publish.yml + secrets: inherit + with: + version: ${{ github.event.release.tag_name }} diff --git a/.github/workflows/gh_pages.yaml b/.github/workflows/gh_pages.yaml index d4133a60..c2e0e0bd 100644 --- a/.github/workflows/gh_pages.yaml +++ b/.github/workflows/gh_pages.yaml @@ -1,10 +1,9 @@ name: GitHub Page Publish + on: - push: - branches: main - paths: - - ".github/workflows/gh_pages.yaml" - - "frontend/**" + release: + types: [published] + jobs: build-and-deploy: runs-on: ubuntu-latest From 0464a43e22563beaf7165d58d89ce591da2e9111 Mon Sep 17 00:00:00 2001 From: devleejb Date: Mon, 12 Aug 2024 18:11:16 +0900 Subject: [PATCH 3/3] Add jobs for cleaning version --- .github/workflows/docker-publish.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index 714b6926..4ac9bce2 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -2,9 +2,23 @@ name: docker-publish on: release: types: [published] + jobs: + process-version: + runs-on: ubuntu-latest + outputs: + cleaned_version: ${{ steps.remove_v.outputs.cleaned_version }} + steps: + - name: Remove 'v' prefix from version + id: remove_v + run: | + VERSION=${{ github.event.release.tag_name }} + CLEANED_VERSION=${VERSION#v} + echo "cleaned_version=$CLEANED_VERSION" >> $GITHUB_OUTPUT + call-base-docker-publish: + needs: process-version uses: ./.github/workflows/base-docker-publish.yml secrets: inherit with: - version: ${{ github.event.release.tag_name }} + version: ${{ needs.process-version.outputs.cleaned_version }}