From 3ea11317ea7b221a22d6c9a092256fda09c8a6af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=ED=95=B4=EC=84=B1?= Date: Mon, 26 Feb 2024 22:05:40 +0900 Subject: [PATCH] =?UTF-8?q?CI=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 59 ++++++++++++++++++++++++++ .github/workflows/deployDocsSite.yml | 34 --------------- .github/workflows/deployLibraryYLS.yml | 55 ------------------------ 3 files changed, 59 insertions(+), 89 deletions(-) create mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/deployDocsSite.yml delete mode 100644 .github/workflows/deployLibraryYLS.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..67ba0a1 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,59 @@ +name: Deploy + +on: + push: + branches: [ master, develop ] + +jobs: + deploy-docs: + name: deploy documentation site + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build dokka site + run: ./gradlew dokkaHtml + + - name: Deploy docs site to website + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-page + FOLDER: yls/build/dokka/html/ + TARGET_FOLDER: 'docs/0.x/' + + release: + name: release on github + runs-on: ubuntu-latest + steps: + # Github 저장소를 로컬로 복사합니다. + - uses: actions/checkout@v4 + + # version.properties에 명시된 버전명을 읽어옵니다. + - name: Read versionName property + id: release_version + uses: christian-draeger/read-properties@1.1.1 + with: + path: './version.properties' + properties: 'versionName' + + # 릴리즈 노트를 작성하고 YLS 라이브러리를 Github에 릴리즈합니다. + - name: Create a GitHub release + uses: release-drafter/release-drafter@v5 + with: + config-name: config.yml + version: ${{ steps.release_version.outputs.versionName }} + publish: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/deployDocsSite.yml b/.github/workflows/deployDocsSite.yml deleted file mode 100644 index 6600691..0000000 --- a/.github/workflows/deployDocsSite.yml +++ /dev/null @@ -1,34 +0,0 @@ -# YLS-Android 문서 사이트를 배포하는 workflow입니다. -name: Deploy docs - -on: - push: - branches: [ master, develop ] - -jobs: - release: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - cache: gradle - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Build dokka site - run: ./gradlew dokkaHtml - - - name: Deploy docs site to website - uses: JamesIves/github-pages-deploy-action@releases/v3 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-page - FOLDER: yls/build/dokka/html/ - TARGET_FOLDER: 'docs/0.x/' diff --git a/.github/workflows/deployLibraryYLS.yml b/.github/workflows/deployLibraryYLS.yml deleted file mode 100644 index e5526cb..0000000 --- a/.github/workflows/deployLibraryYLS.yml +++ /dev/null @@ -1,55 +0,0 @@ -# YLS 라이브러리를 깃헙에 배포하는 워크플로입니다. -# 깃허브에 배포되면 자동으로 jitpack에 등록됩니다. (https://jitpack.io/#yourssu/YLS-Android) -name: Deploy YLS Library - -# Github에서 수동으로 실행해야 합니다. -on: workflow_dispatch - -jobs: - release: - runs-on: ubuntu-latest - steps: - # Github 저장소를 로컬로 복사합니다. - - uses: actions/checkout@v3 - - # version.properties에 명시된 버전명을 읽어옵니다. - - name: Read versionName property - id: release_version - uses: christian-draeger/read-properties@1.1.1 - with: - path: './version.properties' - properties: 'versionName' - - # gradle 빌드을 위해 JDK를 세팅합니다. - - name: set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: gradle - - # 빌드에 필요한 환경변수를 세팅합니다. - - name: Setting env - run: | - echo "BUILD_NUMBER=$GITHUB_RUN_NUMBER" >> $GITHUB_ENV - echo "STORE_PASSWORD=${{ secrets.STORE_PASSWORD }}" >> $GITHUB_ENV - echo "KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> $GITHUB_ENV - echo "KEY_PASSWORD=${{ secrets.KEY_PASSWORD }}" >> $GITHUB_ENV - - # gradlew에 실행 권한을 부여합니다. - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - # bundleProduction 버전의 aab를 빌드합니다. (배포 전에 문제가 없는지 테스트하기 위함) - - name: Build with Gradle - run: ./gradlew --no-daemon :app:storybook:bundleProductionRelease - - # 릴리즈 노트를 작성하고 YDS 라이브러리를 Github에 릴리즈합니다. - - name: Create a GitHub release - uses: release-drafter/release-drafter@v5 - with: - config-name: config.yml - version: ${{ steps.release_version.outputs.versionName }} - publish: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}