diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000000000000000000000000000000000000..b11e64fc670321c88ec3f2c0e7e4fcf2f9f060fc --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,37 @@ +name: Deploy javadocs to GitHub pages + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + pages: + runs-on: ubuntu-latest + steps: + # GET LATEST CODE + - name: Checkout latest code + uses: actions/checkout@master + with: + fetch-depth: 0 + + # BUILD PROJECT AND PUBLISH TO PACKAGES + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '8' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build documentation + run: ./gradlew about build -x test + - name: List files + run: ls -ahl build/libs + + # DEPLOY TO GH-PAGES + - name: Deploy to GitHub-Pages + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + branch: gh-pages + folder: build/docs/javadoc diff --git a/.github/workflows/github_release.yml b/.github/workflows/github_release.yml new file mode 100644 index 0000000000000000000000000000000000000000..dada9a51c7926091df6dad8666cfc7b8a81ef016 --- /dev/null +++ b/.github/workflows/github_release.yml @@ -0,0 +1,96 @@ +name: Create GitHub Release after GitLab tag mirror + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + # GET LATEST CODE + - name: Checkout latest code + uses: actions/checkout@master + with: + fetch-depth: 0 + + # EXTRACT TAG FROM PUSH + - name: Get tag + id: tag + uses: dawidd6/action-get-tag@v1 + - name: Use tag + run: echo ${{steps.tag.outputs.tag}} + + # GENERATE CHANGELOG, RELEASE + - id: conventional_changelog + uses: ardalanamini/auto-changelog@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Create Release + id: create_release + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{steps.tag.outputs.tag}} + body: | + Automatic release of version: **${{steps.tag.outputs.tag}}** + **Changes in this release:** + ${{ steps.conventional_changelog.outputs.changelog }} + draft: false + prerelease: false + + # BUILD PROJECT AND PUBLISH TO PACKAGES + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: '8' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Publish to GitHub Packages + env: + GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + NEW_VERSION=$(echo "${{steps.tag.outputs.tag}}") + echo "New version: ${NEW_VERSION}" + echo "Github username: ${GITHUB_ACTOR}" + ./gradlew about + ./gradlew -Pversion=${NEW_VERSION} --info -x test + - name: List files + run: ls -ahl build/libs + + # UPLOAD ASSETS TO RELEASE + - name: Upload Release Asset Main Jar + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./build/libs/serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}.jar + asset_name: serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}.jar + asset_content_type: application/jar + - name: Upload Release Asset Sources Jar + id: upload-release-asset-sources + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./build/libs/serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-sources.jar + asset_name: serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-sources.jar + asset_content_type: application/jar + - name: Upload Release Asset Javadoc Jar + id: upload-release-asset-javadoc + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./build/libs/serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-javadoc.jar + asset_name: serverpackcreatorexampleaddon-${{steps.tag.outputs.tag}}-javadoc.jar + asset_content_type: application/jar \ No newline at end of file diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000000000000000000000000000000000000..6b74e363b964e0c302c81cf526222f38c7991688 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,13 @@ +name: Greetings + +on: [pull_request, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/Griefed/ServerPackCreator/blob/1bbbfc59207e801068aa0f92ccd2869079fce7da/.github/ISSUE_TEMPLATE/bug-report.md), [feature](https://github.com/Griefed/ServerPackCreator/blob/1bbbfc59207e801068aa0f92ccd2869079fce7da/.github/ISSUE_TEMPLATE/feature-request.md), or [documentation](https://github.com/Griefed/ServerPackCreator/blob/1bbbfc59207e801068aa0f92ccd2869079fce7da/.github/ISSUE_TEMPLATE/documentation-request.md) issue templates!' + pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/Griefed/ServerPackCreator/blob/1bbbfc59207e801068aa0f92ccd2869079fce7da/.github/ISSUE_TEMPLATE/pull_request.md)!' diff --git a/.github/workflows/label_sponsors.yml b/.github/workflows/label_sponsors.yml new file mode 100644 index 0000000000000000000000000000000000000000..e5454372f60fb9460864e460de1441cbceb37e08 --- /dev/null +++ b/.github/workflows/label_sponsors.yml @@ -0,0 +1,16 @@ +name: Label sponsors + +on: + pull_request: + types: [opened] + issues: + types: [opened] + +jobs: + build: + name: Label issues and pull requests made by sponsors + runs-on: ubuntu-latest + steps: + - uses: JasonEtco/is-sponsor-label-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.CR_PAT }}