From 9293e2833b01dcb76af85fcb2388a33701dc3ca1 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Fri, 15 Jul 2022 17:05:03 +0200 Subject: Release workflow (#53) * release workflow * update normal version to hash * fix * fix naming * fix some stuff * fix version thing * switch to number from hash --- .github/workflows/build.yml | 45 ++++++++++++++++++++++++++++++++++++++++ .github/workflows/checks.yml | 43 -------------------------------------- .github/workflows/release.yml | 48 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/checks.yml create mode 100644 .github/workflows/release.yml (limited to '.github') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..62816b1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +# Build Workflow + +name: Build + +on: + pull_request: + workflow_dispatch: + push: + branches-ignore: + - master + +concurrency: + group: ${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }} + cancel-in-progress: true + +jobs: + build: + name: Build + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: 17 + distribution: temurin + cache: gradle + + - name: Chmod Gradle + run: chmod +x ./gradlew + + - name: Build + run: ./gradlew build --no-daemon + + - name: Upload Build Artifacts + uses: actions/upload-artifact@v2 + with: + name: oneconfig-artifacts + path: versions/**/build/libs/ diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml deleted file mode 100644 index 1172731..0000000 --- a/.github/workflows/checks.yml +++ /dev/null @@ -1,43 +0,0 @@ -# Build Workflow - -name: Build - -on: - - pull_request - - workflow_dispatch - - push - -concurrency: - group: ${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }} - cancel-in-progress: true - -jobs: - build: - name: Build - - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set up JDK 17 - uses: actions/setup-java@v2 - with: - java-version: 17 - distribution: temurin - cache: gradle - - - name: Chmod Gradle - run: chmod +x ./gradlew - - - name: Build - run: ./gradlew build --no-daemon - - - name: Upload Build Artifacts - uses: actions/upload-artifact@v2 - with: - name: oneconfig-artifacts - path: versions/**/build/libs/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9d75d9c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +# Release Workflow + +name: Release + +on: + workflow_dispatch: + push: + branches: + - master + +concurrency: + group: ${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }} + cancel-in-progress: true + +jobs: + build: + name: Build + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: 17 + distribution: temurin + cache: gradle + + - name: Chmod Gradle + run: chmod +x ./gradlew + + - name: Get version number + run: echo '::set-output name=VERSION_NUMBER::$(46 + ${{ github.run_number }})' + id: version + + - name: Publish + run: ./gradlew platform:1.8.9-forge:publishOneconfig-1.8.9-forgePublicationToReleasesRepository -Pmod_minor_version=${{ steps.version.outputs.VERSION_NUMBER }} -PreleasesUsername=${{ secrets.MAVEN_NAME }} -PreleasesPassword=${{ secrets.MAVEN_TOKEN }} --no-daemon + + - name: Upload Build Artifacts + uses: actions/upload-artifact@v2 + with: + name: oneconfig-artifacts + path: versions/**/build/libs/ \ No newline at end of file -- cgit