버전업데이트 #44
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| publish: | |
| name: Release Secure Channel Library | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Cache Gradle and wrapper | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Grant Permission for Gradlew to Execute | |
| run: chmod +x gradlew | |
| - name: Set Gradle Properties 1 | |
| uses: jacobtomlinson/gha-find-replace@v3 | |
| with: | |
| find: "local.properties" | |
| replace: "gradle.properties" | |
| include: "securechannel/build.gradle.kts" | |
| - name: Set Gradle Properties 2 | |
| uses: jacobtomlinson/gha-find-replace@v3 | |
| with: | |
| find: "DEV_SERVER_AUTH_URL" | |
| replace: ${{secrets.DEV_SERVER_AUTH_URL}} | |
| include: "gradle.properties" | |
| - name: Set Gradle Properties 3 | |
| uses: jacobtomlinson/gha-find-replace@v3 | |
| with: | |
| find: "STG_SERVER_AUTH_URL" | |
| replace: ${{secrets.STG_SERVER_AUTH_URL}} | |
| include: "gradle.properties" | |
| - name: Set Gradle Properties 4 | |
| uses: jacobtomlinson/gha-find-replace@v3 | |
| with: | |
| find: "SERVER_AUTH_URL" | |
| replace: ${{secrets.SERVER_AUTH_URL}} | |
| include: "gradle.properties" | |
| - name: Build AAR ⚙️🛠 | |
| run: bash ./gradlew :securechannel:assemble | |
| - name: Publish to GitHub Package Registry 🚀 | |
| run: bash ./gradlew :securechannel:publish | |
| env: | |
| GPR_USR: ${{ github.actor }} | |
| GPR_KEY: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Release ✅ | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref }} | |
| release_name: ${{ github.ref }} | |
| draft: true | |
| prerelease: false | |
| - name: Upload Secure Channel AAR 🗳 | |
| uses: softprops/action-gh-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: securechannel/build/outputs/aar/securechannel-release.aar | |
| asset_name: securechannel.aar | |
| asset_content_type: application/aar |