From 5baaf3eec544dfc98e7924fdbfdb16fbdbe4693e Mon Sep 17 00:00:00 2001 From: Propromp Date: Sun, 9 Jan 2022 22:22:29 +0900 Subject: [PATCH 1/7] github actions --- .github/workflows/build_and_release.yml | 77 +++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .github/workflows/build_and_release.yml diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml new file mode 100644 index 0000000..88ae7a7 --- /dev/null +++ b/.github/workflows/build_and_release.yml @@ -0,0 +1,77 @@ +name: Build and release +on: push +jobs: + constants: + runs-on: ubuntu-latest + outputs: + minecraft-version: "1.16.5" + java-version: "8" + steps: + - run: echo constants + build: + needs: [constants] + runs-on: ubuntu-latest + outputs: + filename: ${{ steps.get-filename.outputs.filename }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Cache Gradle + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/gradle.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Set up JDK + uses: actions/setup-java@v2.3.0 + with: + distribution: 'temurin' + java-version: ${{ needs.constants.outputs.java-version }} + - name: Configure Git User Details + run: git config --global user.email "actions@github.com" && git config --global user.name "Github Actions" + - name: Build + run: ./buildChiyogami.sh + - run: tree + - name: Get file name + id: get-filename + run: echo ::set-output name=filename::$(ls -1 ./build/libs/) + - name: Upload artifact + uses: actions/upload-artifact@v2 + if: "!failure()" + with: + name: jar + path: build/libs/${{ steps.get-filename.outputs.filename }} + release: + runs-on: ubuntu-latest + needs: [build,constants] + steps: + - name: Download artifact + uses: actions/download-artifact@v2 + with: + name: jar + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ needs.constants.outputs.minecraft-version }}-${{ github.run_number }} + release_name: ${{ needs.constants.outputs.minecraft-version }}-${{ github.run_number }} ${{ github.event.head_commit.message }} + body: "" + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./${{ needs.build.outputs.filename }} + asset_name: ${{ needs.build.outputs.filename }} + asset_content_type: application/zip \ No newline at end of file From d183b9b0aaaae7887b458dbaa54b9b8294e34f19 Mon Sep 17 00:00:00 2001 From: Propromp Date: Sun, 9 Jan 2022 22:23:14 +0900 Subject: [PATCH 2/7] github actions --- .github/workflows/build_and_release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 88ae7a7..9a88d41 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -34,6 +34,8 @@ jobs: java-version: ${{ needs.constants.outputs.java-version }} - name: Configure Git User Details run: git config --global user.email "actions@github.com" && git config --global user.name "Github Actions" + - name: Apply Patches + run: ./gradlew applyPatches --stacktrace - name: Build run: ./buildChiyogami.sh - run: tree From c1248561c43f17d56f3524f791fc9636e95a05aa Mon Sep 17 00:00:00 2001 From: Propromp Date: Sun, 9 Jan 2022 22:27:30 +0900 Subject: [PATCH 3/7] github actions --- .github/workflows/build_and_release.yml | 66 +++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/build_and_release.yml diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml new file mode 100644 index 0000000..062abcf --- /dev/null +++ b/.github/workflows/build_and_release.yml @@ -0,0 +1,66 @@ +name: Build and release +on: push +jobs: + constants: + runs-on: ubuntu-latest + outputs: + minecraft-version: "1.16.5" + java-version: "8" + steps: + - run: echo constants + build: + needs: [constants] + runs-on: ubuntu-latest + outputs: + filename: ${{ steps.get-filename.outputs.filename }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2.3.0 + with: + distribution: 'temurin' + java-version: ${{ needs.constants.outputs.java-version }} + - name: Configure Git User Details + run: git config --global user.email "actions@github.com" && git config --global user.name "Github Actions" + - name: Build + run: ./buildChiyogami.sh + - run: tree + - name: Get file name + id: get-filename + run: echo ::set-output name=filename::$(ls -1 ./build/libs/) + - name: Upload artifact + uses: actions/upload-artifact@v2 + if: "!failure()" + with: + name: jar + path: build/libs/${{ steps.get-filename.outputs.filename }} + release: + runs-on: ubuntu-latest + needs: [build,constants] + steps: + - name: Download artifact + uses: actions/download-artifact@v2 + with: + name: jar + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ needs.constants.outputs.minecraft-version }}-${{ github.run_number }} + release_name: ${{ needs.constants.outputs.minecraft-version }}-${{ github.run_number }} ${{ github.event.head_commit.message }} + body: "" + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./${{ needs.build.outputs.filename }} + asset_name: ${{ needs.build.outputs.filename }} + asset_content_type: application/zip \ No newline at end of file From 5e7edf11febb840c7270a6f970f0befc77ef1e48 Mon Sep 17 00:00:00 2001 From: Propromp Date: Sun, 9 Jan 2022 22:30:31 +0900 Subject: [PATCH 4/7] github actions --- buildChiyogami.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 buildChiyogami.sh diff --git a/buildChiyogami.sh b/buildChiyogami.sh old mode 100644 new mode 100755 From 0a5568d44aa9980b8704dae269ea6ee211df2a91 Mon Sep 17 00:00:00 2001 From: Propromp Date: Sun, 9 Jan 2022 22:38:38 +0900 Subject: [PATCH 5/7] github actions --- rebuild.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 rebuild.sh diff --git a/rebuild.sh b/rebuild.sh old mode 100644 new mode 100755 From 713e540664a002f012c7c106a3d48191382c9a60 Mon Sep 17 00:00:00 2001 From: Propromp Date: Sun, 9 Jan 2022 22:48:00 +0900 Subject: [PATCH 6/7] github actions --- .github/workflows/build_and_release.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 062abcf..5ed4c5e 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -12,7 +12,7 @@ jobs: needs: [constants] runs-on: ubuntu-latest outputs: - filename: ${{ steps.get-filename.outputs.filename }} + filename: Chiyogami-${{ needs.constants.outputs.minecraft-version }}.jar steps: - name: Checkout uses: actions/checkout@v2 @@ -26,15 +26,12 @@ jobs: - name: Build run: ./buildChiyogami.sh - run: tree - - name: Get file name - id: get-filename - run: echo ::set-output name=filename::$(ls -1 ./build/libs/) - name: Upload artifact uses: actions/upload-artifact@v2 if: "!failure()" with: name: jar - path: build/libs/${{ steps.get-filename.outputs.filename }} + path: ./Chiyogami-${{ needs.constants.outputs.minecraft-version }}.jar release: runs-on: ubuntu-latest needs: [build,constants] From 267a363bf5be091c673cc8b3f03cc4aea9c5c12c Mon Sep 17 00:00:00 2001 From: Propromp Date: Sun, 9 Jan 2022 22:55:16 +0900 Subject: [PATCH 7/7] github actions --- .github/workflows/build_and_release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 5ed4c5e..89acb5e 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -25,7 +25,6 @@ jobs: run: git config --global user.email "actions@github.com" && git config --global user.name "Github Actions" - name: Build run: ./buildChiyogami.sh - - run: tree - name: Upload artifact uses: actions/upload-artifact@v2 if: "!failure()"