[Hotfix] 무조건 솝트와 N개월로 리턴되게 수정 #125
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🚀MAKERS-APP-RELEASE! | |
| on: | |
| push: | |
| branches: [ 'main' ] | |
| tags: [ 'makers-app-develop' ] | |
| env: | |
| RESOURCE_PATH: ./src/main/resources/application-prod.yml | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| deployment-group-name: [ makers-app ] | |
| codedeploy-application-name: [ app ] | |
| s3-bucket: [ sopt-makers-app ] | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v3 | |
| - name: set up JDK 21 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'corretto' | |
| java-version: '21' | |
| - name: mkdir resources folder | |
| run: | | |
| touch ./src/main/resources/application-prod.yml | |
| touch ./src/test/resources/application-test.yml | |
| shell: bash | |
| - name: copy yml file | |
| run: | | |
| echo "${{ secrets.APPLICATION_PROD_YML }}" > ./src/main/resources/application-prod.yml | |
| echo "${{ secrets.APPLICATION_TEST_YML }}" > ./src/test/resources/application-test.yml | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: 🐈 Gradle Build | |
| run: ./gradlew clean build | |
| - name: 📂 Make zip file | |
| run: zip -r ./$GITHUB_SHA.zip . | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v2 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} | |
| aws-region: ap-northeast-2 | |
| - name: 🚀 s3 upload | |
| run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://${{matrix.s3-bucket}}/deploy/$GITHUB_SHA.zip | |
| - name: CodeDeploy~! | |
| run: aws deploy create-deployment | |
| --application-name ${{matrix.codedeploy-application-name}} | |
| --deployment-group-name ${{matrix.deployment-group-name}} | |
| --s3-location bucket=${{matrix.s3-bucket}},bundleType=zip,key=deploy/$GITHUB_SHA.zip | |
| --region ap-northeast-2 | |