chore: diff test

This commit is contained in:
usbharu 2024-08-10 13:53:10 +09:00
parent ceb206289c
commit 6062230e78
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
3 changed files with 47 additions and 1 deletions

8
.github/monorepo.json vendored Normal file
View File

@ -0,0 +1,8 @@
{
"projects": {
"./hideout-activitypub": "hideout-activitypub",
"./hideout-core": "hideout-core",
"./hideout-mastodon": "hideout-mastodon",
"./owl": "owl"
}
}

View File

@ -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"

View File

@ -12,7 +12,6 @@ plugins {
alias(libs.plugins.kotlin.spring)
alias(libs.plugins.kover)
alias(libs.plugins.license.report)
}
apply {