From addcb47e15b19f7ce49d2615d9ad1aa07c3b9c30 Mon Sep 17 00:00:00 2001 From: Syrent <56670179+Syrent@users.noreply.github.com> Date: Sat, 1 Jun 2024 10:16:52 +0330 Subject: [PATCH] Create publish-snapshot.yml --- .github/workflows/publish-snapshot.yml | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/publish-snapshot.yml diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml new file mode 100644 index 0000000..4be3d3c --- /dev/null +++ b/.github/workflows/publish-snapshot.yml @@ -0,0 +1,33 @@ +name: Publish Snapshots +on: + push: + branches: + - master + +jobs: + publish: + runs-on: ubuntu-22.04 + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 17 + - name: Change wrapper permissions + run: chmod +x ./gradlew + - name: Cache Gradle dependencies + uses: actions/cache@v3 + with: + path: ~/.gradle/caches + key: ${{ runner.OS }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: | + ${{ runner.OS }}-gradle- + - name: Publish to SayanDevelopment snapshot repo + run: ./gradlew publish + env: + REPO_SAYAN_USER: ${{ secrets.REPO_SAYAN_USER }} + REPO_SAYAN_TOKEN: ${{ secrets.REPO_SAYAN_TOKEN }}