diff --git a/.github/workflows/release_server.yml b/.github/workflows/release_server.yml new file mode 100644 index 00000000..28972271 --- /dev/null +++ b/.github/workflows/release_server.yml @@ -0,0 +1,30 @@ +name: Release server + +on: + release: + types: [published] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build server + run: ./gradlew server:build + - name: Release artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: server/build/libs/server.jar + asset_name: server.jar + asset_content_type: application/zip \ No newline at end of file