From 8bfd9907b91a3d741dbdbff3b4c06536a89ee11e Mon Sep 17 00:00:00 2001 From: ghostflyby Date: Fri, 9 Feb 2024 13:11:51 +0800 Subject: [PATCH] GitHub work flows --- .github/pr-branch-labeler.yml | 2 ++ .github/test-scala-presence.toml | 2 ++ .github/workflows/build-and-test.yml | 15 +++++++++++++++ .github/workflows/label-mute-prs.yml | 17 +++++++++++++++++ .github/workflows/release-tags.yml | 14 ++++++++++++++ .github/workflows/test-scala-presence.yml | 18 ++++++++++++++++++ 6 files changed, 68 insertions(+) create mode 100644 .github/pr-branch-labeler.yml create mode 100644 .github/test-scala-presence.toml create mode 100644 .github/workflows/build-and-test.yml create mode 100644 .github/workflows/label-mute-prs.yml create mode 100644 .github/workflows/release-tags.yml create mode 100644 .github/workflows/test-scala-presence.yml diff --git a/.github/pr-branch-labeler.yml b/.github/pr-branch-labeler.yml new file mode 100644 index 0000000..b3a4edc --- /dev/null +++ b/.github/pr-branch-labeler.yml @@ -0,0 +1,2 @@ +MuTE: + base: 'feature/MuTEMaster' diff --git a/.github/test-scala-presence.toml b/.github/test-scala-presence.toml new file mode 100644 index 0000000..ae0e9ac --- /dev/null +++ b/.github/test-scala-presence.toml @@ -0,0 +1,2 @@ +[exclude] +"src/main/java/**/*.java" = "import scala." \ No newline at end of file diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..4911b0f --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,15 @@ + +name: Build and test + +on: + pull_request: + branches: [ master, main ] + push: + branches: [ master, main ] + +jobs: + build-and-test: + uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master + secrets: inherit + with: + timeout: 150 diff --git a/.github/workflows/label-mute-prs.yml b/.github/workflows/label-mute-prs.yml new file mode 100644 index 0000000..80ae613 --- /dev/null +++ b/.github/workflows/label-mute-prs.yml @@ -0,0 +1,17 @@ +name: Pull request labeling + +on: + pull_request_target: + types: + - opened + branches: + - 'feature/MuTEMaster' + +jobs: + label_prs: + runs-on: ubuntu-latest + steps: + - name: Label MuTE PRs + uses: ffittschen/pr-branch-labeler@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-tags.yml b/.github/workflows/release-tags.yml new file mode 100644 index 0000000..e4c0be6 --- /dev/null +++ b/.github/workflows/release-tags.yml @@ -0,0 +1,14 @@ + +name: Release tagged build + +on: + push: + tags: [ '*' ] + +permissions: + contents: write + +jobs: + release-tags: + uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master + secrets: inherit diff --git a/.github/workflows/test-scala-presence.yml b/.github/workflows/test-scala-presence.yml new file mode 100644 index 0000000..6b1091e --- /dev/null +++ b/.github/workflows/test-scala-presence.yml @@ -0,0 +1,18 @@ +name: Test Scala Presence + +on: + pull_request: + branches: [ master, main ] + push: + branches: [ master, main ] + +jobs: + test-scala-presence: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Check file content + uses: mattsb42-meta/not-grep@1.0.0 + with: + config-file: ./.github/test-scala-presence.toml