๐ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ฒ์ 1 ๋ฐฐํฌ #25
Workflow file for this run
This file contains 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: JitPack Release | |
on: | |
push: | |
branches: | |
- release | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Cache Gradle packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Publish to JitPack | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
echo "Publishing to JitPack for tag ${{ github.ref }}" | |
# JitPack์ GitHub์์ ํธ์๋ ํ๊ทธ๋ฅผ ์๋์ผ๋ก ์ธ์ํ๋ฏ๋ก ๋ณ๋์ ํธ์ ์์ ์ด ํ์ํ์ง ์์ต๋๋ค. | |
# ๋จ์ํ ๋น๋๊ฐ ์ฑ๊ณตํ๋ฉด, JitPack์์ ์๋ก์ด ๋ฒ์ ์ ๊ฐ์งํฉ๋๋ค. | |
# ํ์์ ์ถ๊ฐ ์คํฌ๋ฆฝํธ๋ฅผ ์ฌ๊ธฐ์ ํฌํจํ ์ ์์ต๋๋ค. | |
- name: Notify JitPack | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
echo "Notifying JitPack about the new release..." | |
curl -X POST https://jitpack.io/api/builds/${{ github.repository }}/commits/${{ github.sha }} | |