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)