From 26b28d511e008af1c9ce56d05657d30f352f8a9d Mon Sep 17 00:00:00 2001 From: Propromp
Date: Sun, 9 Jan 2022 22:58:16 +0900 Subject: [PATCH 1/2] github actions --- .github/workflows/build_and_release.yml | 62 +++++++++++++++++++++++++ 1 file changed, 62 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..2ff0ce7 --- /dev/null +++ b/.github/workflows/build_and_release.yml @@ -0,0 +1,62 @@ +name: Build and release +on: push +jobs: + constants: + runs-on: ubuntu-latest + outputs: + minecraft-version: "1.15.2" + java-version: "8" + steps: + - run: echo constants + build: + needs: [constants] + runs-on: ubuntu-latest + outputs: + filename: Chiyogami-${{ needs.constants.outputs.minecraft-version }}.jar + 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 + - name: Upload artifact + uses: actions/upload-artifact@v2 + if: "!failure()" + with: + name: jar + path: ./Chiyogami-${{ needs.constants.outputs.minecraft-version }}.jar + 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 807a953962f1c06bad3fa12ae07b21e2b5bdea75 Mon Sep 17 00:00:00 2001 From: Propromp
Date: Sun, 9 Jan 2022 22:59:29 +0900 Subject: [PATCH 2/2] github actions --- buildChiyogami.sh | 0 rebuild.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 buildChiyogami.sh mode change 100644 => 100755 rebuild.sh diff --git a/buildChiyogami.sh b/buildChiyogami.sh old mode 100644 new mode 100755 diff --git a/rebuild.sh b/rebuild.sh old mode 100644 new mode 100755