diff --git a/.github/monorepo.json b/.github/monorepo.json new file mode 100644 index 00000000..36313cce --- /dev/null +++ b/.github/monorepo.json @@ -0,0 +1,8 @@ +{ + "projects": { + "./hideout-activitypub": "hideout-activitypub", + "./hideout-core": "hideout-core", + "./hideout-mastodon": "hideout-mastodon", + "./owl": "owl" + } +} \ No newline at end of file diff --git a/.github/workflows/master-publish-package.yaml b/.github/workflows/master-publish-package.yaml new file mode 100644 index 00000000..8b7f3cda --- /dev/null +++ b/.github/workflows/master-publish-package.yaml @@ -0,0 +1,39 @@ +name: master-publish-package.yaml +on: + pull_request: + branches: + - "master" + - "release-test-master" +jobs: + release-diff-check: + name: Release diff check + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Check diff + id: check-diff + uses: actions/github-script@v3 + with: + result-encoding: 'json' + script: | + const fs = require('fs') + const {execSync} = require('child_process'); + const jsonData = JSON.parse(fs.readFileSync('./.github/monorepo.json', 'utf8')); + + var tags = [] + + for (let [key, value] of Object.entries(jsonData.projects)) { + const command = "git diff origin/master HEAD --name-only --relative=" + key + "\n"; + const output = execSync(command, {encoding: 'utf8'}); + if (output.length != 0) { + tags.push(value) + } + } + return tags + + - name: show diff + env: + DIFF: ${{ steps.check-diff.outputs.result }} + run: echo "$DIFF" \ No newline at end of file diff --git a/hideout-core/build.gradle.kts b/hideout-core/build.gradle.kts index 2e0c34e4..2739b00b 100644 --- a/hideout-core/build.gradle.kts +++ b/hideout-core/build.gradle.kts @@ -12,7 +12,6 @@ plugins { alias(libs.plugins.kotlin.spring) alias(libs.plugins.kover) alias(libs.plugins.license.report) - } apply {