From c8b9a1273cc6831f49ed20c33c074c881919e436 Mon Sep 17 00:00:00 2001 From: Nekoneko Date: Fri, 19 Jun 2020 15:58:50 +0900 Subject: [PATCH] =?UTF-8?q?Actions=E3=81=A8=E3=83=80=E3=82=A6=E3=83=B3?= =?UTF-8?q?=E3=83=AD=E3=83=BC=E3=83=89=E3=83=AA=E3=83=B3=E3=82=AF=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 56 ++++++++++++++++++++++++++++++++++++ README.md | 4 ++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..9aaca3b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,56 @@ +name: Java CI + +on: + push: + branches: + - master + +jobs: + build: + name: Build and Deploy + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'ci skip')" + steps: + - name: Checkout branch + uses: actions/checkout@v2 + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Cache Maven repository + uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Build + id: build + run: mvn package + + - name: Set release tag + run: | + echo "::set-env name=TAG_NAME::$(echo $GITHUB_SHA | cut -c1-7)" + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.TAG_NAME }} + release_name: ${{ github.event.head_commit.message }} + body: Auto release + + - name: 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: ./target/TeamChat.jar + asset_name: TeamChat.jar + asset_content_type: application/java-archive diff --git a/README.md b/README.md index 81e6d44..2571825 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,6 @@ - /teamchat exclusion (team) - 指定したチームをチームチャットから除外する - /g - 全体チャット -※表示名や例外を削除するにはconfig.ymlを変更してください \ No newline at end of file +※表示名や例外を削除するにはconfig.ymlを変更してください + +[ダウンロード](https://github.com/mc-nekoneko/TeamChat/releases/latest/download/TeamChat.jar)