@@ -711,7 +711,8 @@ jobs:
711711 /OpenHuman_.*_x64\.dmg$/,
712712 /OpenHuman_.*_amd64\.AppImage$/,
713713 /OpenHuman_.*_amd64\.deb$/,
714- /(OpenHuman_.*_x64-setup\.exe$|OpenHuman_.*_x64.*\.msi$)/,
714+ // Windows build is currently disabled in the matrix
715+ // /(OpenHuman_.*_x64-setup\.exe$|OpenHuman_.*_x64.*\.msi$)/,
715716 ];
716717
717718 const missing = requiredPatterns.filter((pattern) => !names.some((name) => pattern.test(name)));
@@ -734,146 +735,146 @@ jobs:
734735 });
735736 core.info(`Published release ${releaseId}`);
736737
737- notify-discord :
738- name : Notify Discord about release
739- runs-on : ubuntu-latest
740- environment : Production
741- needs : [prepare-release, create-release, build-artifacts, publish-release]
742- if : needs.publish-release.result == 'success' && needs.build-artifacts.result == 'success'
743- steps :
744- - name : Post release notification to Discord
745- continue-on-error : true
746- uses : actions/github-script@v7
747- env :
748- DISCORD_RELEASE_WEBHOOK_URL : ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}
749- RELEASE_ID : ${{ needs.create-release.outputs.release_id }}
750- RELEASE_TAG : ${{ needs.prepare-release.outputs.tag }}
751- with :
752- script : |
753- const webhookUrl = process.env.DISCORD_RELEASE_WEBHOOK_URL;
754- const releaseId = Number(process.env.RELEASE_ID);
755- const releaseTag = process.env.RELEASE_TAG;
756-
757- if (!webhookUrl) {
758- core.warning('DISCORD_RELEASE_WEBHOOK_URL is not configured; skipping Discord release notification.');
759- return;
760- }
761-
762- if (!Number.isFinite(releaseId) || releaseId <= 0) {
763- core.warning(`Invalid release id "${process.env.RELEASE_ID}"; skipping Discord release notification.`);
764- return;
765- }
766-
767- const { owner, repo } = context.repo;
768- const maxDescriptionLength = 3500;
769- const maxAssetLines = 8;
770-
771- function truncate(text, maxLength) {
772- if (!text) return '';
773- if (text.length <= maxLength) return text;
774- return `${text.slice(0, maxLength - 3)}...`;
775- }
776-
777- function stripMarkdownHeadings(text) {
778- return text
779- .replace(/^#{1,6}\s+/gm, '')
780- .replace(/\r/g, '')
781- .trim();
782- }
783-
784- const { data: release } = await github.rest.repos.getRelease({
785- owner,
786- repo,
787- release_id: releaseId,
788- });
789-
790- const releases = await github.paginate(github.rest.repos.listReleases, {
791- owner,
792- repo,
793- per_page: 100,
794- });
795- const sortedPublished = releases
796- .filter((item) => !item.draft)
797- .sort((a, b) => new Date(b.published_at || b.created_at || 0) - new Date(a.published_at || a.created_at || 0));
798- const currentIndex = sortedPublished.findIndex((item) => item.id === release.id);
799- const previousRelease = currentIndex >= 0 ? sortedPublished[currentIndex + 1] : null;
800- const compareUrl = previousRelease
801- ? `https://github.com/${owner}/${repo}/compare/${previousRelease.tag_name}...${release.tag_name}`
802- : null;
803-
804- const releaseTitle = release.name || release.tag_name || releaseTag;
805- const bodyText = stripMarkdownHeadings(release.body || '');
806- const summary = bodyText
807- ? truncate(bodyText, maxDescriptionLength)
808- : 'GitHub release published. See the release page for full notes.';
809-
810- const assetLines = (release.assets || [])
811- .slice(0, maxAssetLines)
812- .map((asset) => `- [${asset.name}](${asset.browser_download_url})`);
813- const extraAssetCount = Math.max((release.assets || []).length - maxAssetLines, 0);
814- if (extraAssetCount > 0) {
815- assetLines.push(`- ${extraAssetCount} more asset(s) available on the release page`);
816- }
817-
818- const fields = [
819- {
820- name: 'Version',
821- value: `\`${release.tag_name || releaseTag}\``,
822- inline: true,
823- },
824- {
825- name: 'Release',
826- value: `[Open on GitHub](${release.html_url})`,
827- inline: true,
828- },
829- ];
830-
831- if (compareUrl) {
832- fields.push({
833- name: 'Compare',
834- value: `[${previousRelease.tag_name}...${release.tag_name}](${compareUrl})`,
835- inline: true,
836- });
837- }
838-
839- if (assetLines.length > 0) {
840- fields.push({
841- name: 'Artifacts',
842- value: assetLines.join('\n'),
843- inline: false,
844- });
845- }
846-
847- const payload = {
848- content: `New GitHub release published for \`${owner}/${repo}\`: **${releaseTitle}**`,
849- embeds: [
850- {
851- title: releaseTitle,
852- url: release.html_url,
853- description: summary,
854- color: release.prerelease ? 0xf0ad4e : 0x2ecc71,
855- fields,
856- footer: {
857- text: release.prerelease ? 'Pre-release' : 'Published release',
858- },
859- timestamp: release.published_at || new Date().toISOString(),
860- },
861- ],
862- };
863-
864- const response = await fetch(webhookUrl, {
865- method: 'POST',
866- headers: { 'Content-Type': 'application/json' },
867- body: JSON.stringify(payload),
868- });
869-
870- if (!response.ok) {
871- const body = await response.text();
872- core.warning(`Discord notification failed: HTTP ${response.status} ${body.slice(0, 300)}`);
873- return;
874- }
875-
876- core.info(`Posted Discord release notification for ${release.tag_name || releaseTag}.`);
738+ # notify-discord:
739+ # name: Notify Discord about release
740+ # runs-on: ubuntu-latest
741+ # environment: Production
742+ # needs: [prepare-release, create-release, build-artifacts, publish-release]
743+ # if: needs.publish-release.result == 'success' && needs.build-artifacts.result == 'success'
744+ # steps:
745+ # - name: Post release notification to Discord
746+ # continue-on-error: true
747+ # uses: actions/github-script@v7
748+ # env:
749+ # DISCORD_RELEASE_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}
750+ # RELEASE_ID: ${{ needs.create-release.outputs.release_id }}
751+ # RELEASE_TAG: ${{ needs.prepare-release.outputs.tag }}
752+ # with:
753+ # script: |
754+ # const webhookUrl = process.env.DISCORD_RELEASE_WEBHOOK_URL;
755+ # const releaseId = Number(process.env.RELEASE_ID);
756+ # const releaseTag = process.env.RELEASE_TAG;
757+
758+ # if (!webhookUrl) {
759+ # core.warning('DISCORD_RELEASE_WEBHOOK_URL is not configured; skipping Discord release notification.');
760+ # return;
761+ # }
762+
763+ # if (!Number.isFinite(releaseId) || releaseId <= 0) {
764+ # core.warning(`Invalid release id "${process.env.RELEASE_ID}"; skipping Discord release notification.`);
765+ # return;
766+ # }
767+
768+ # const { owner, repo } = context.repo;
769+ # const maxDescriptionLength = 3500;
770+ # const maxAssetLines = 8;
771+
772+ # function truncate(text, maxLength) {
773+ # if (!text) return '';
774+ # if (text.length <= maxLength) return text;
775+ # return `${text.slice(0, maxLength - 3)}...`;
776+ # }
777+
778+ # function stripMarkdownHeadings(text) {
779+ # return text
780+ # .replace(/^#{1,6}\s+/gm, '')
781+ # .replace(/\r/g, '')
782+ # .trim();
783+ # }
784+
785+ # const { data: release } = await github.rest.repos.getRelease({
786+ # owner,
787+ # repo,
788+ # release_id: releaseId,
789+ # });
790+
791+ # const releases = await github.paginate(github.rest.repos.listReleases, {
792+ # owner,
793+ # repo,
794+ # per_page: 100,
795+ # });
796+ # const sortedPublished = releases
797+ # .filter((item) => !item.draft)
798+ # .sort((a, b) => new Date(b.published_at || b.created_at || 0) - new Date(a.published_at || a.created_at || 0));
799+ # const currentIndex = sortedPublished.findIndex((item) => item.id === release.id);
800+ # const previousRelease = currentIndex >= 0 ? sortedPublished[currentIndex + 1] : null;
801+ # const compareUrl = previousRelease
802+ # ? `https://github.com/${owner}/${repo}/compare/${previousRelease.tag_name}...${release.tag_name}`
803+ # : null;
804+
805+ # const releaseTitle = release.name || release.tag_name || releaseTag;
806+ # const bodyText = stripMarkdownHeadings(release.body || '');
807+ # const summary = bodyText
808+ # ? truncate(bodyText, maxDescriptionLength)
809+ # : 'GitHub release published. See the release page for full notes.';
810+
811+ # const assetLines = (release.assets || [])
812+ # .slice(0, maxAssetLines)
813+ # .map((asset) => `- [${asset.name}](${asset.browser_download_url})`);
814+ # const extraAssetCount = Math.max((release.assets || []).length - maxAssetLines, 0);
815+ # if (extraAssetCount > 0) {
816+ # assetLines.push(`- ${extraAssetCount} more asset(s) available on the release page`);
817+ # }
818+
819+ # const fields = [
820+ # {
821+ # name: 'Version',
822+ # value: `\`${release.tag_name || releaseTag}\``,
823+ # inline: true,
824+ # },
825+ # {
826+ # name: 'Release',
827+ # value: `[Open on GitHub](${release.html_url})`,
828+ # inline: true,
829+ # },
830+ # ];
831+
832+ # if (compareUrl) {
833+ # fields.push({
834+ # name: 'Compare',
835+ # value: `[${previousRelease.tag_name}...${release.tag_name}](${compareUrl})`,
836+ # inline: true,
837+ # });
838+ # }
839+
840+ # if (assetLines.length > 0) {
841+ # fields.push({
842+ # name: 'Artifacts',
843+ # value: assetLines.join('\n'),
844+ # inline: false,
845+ # });
846+ # }
847+
848+ # const payload = {
849+ # content: `New GitHub release published for \`${owner}/${repo}\`: **${releaseTitle}**`,
850+ # embeds: [
851+ # {
852+ # title: releaseTitle,
853+ # url: release.html_url,
854+ # description: summary,
855+ # color: release.prerelease ? 0xf0ad4e : 0x2ecc71,
856+ # fields,
857+ # footer: {
858+ # text: release.prerelease ? 'Pre-release' : 'Published release',
859+ # },
860+ # timestamp: release.published_at || new Date().toISOString(),
861+ # },
862+ # ],
863+ # };
864+
865+ # const response = await fetch(webhookUrl, {
866+ # method: 'POST',
867+ # headers: { 'Content-Type': 'application/json' },
868+ # body: JSON.stringify(payload),
869+ # });
870+
871+ # if (!response.ok) {
872+ # const body = await response.text();
873+ # core.warning(`Discord notification failed: HTTP ${response.status} ${body.slice(0, 300)}`);
874+ # return;
875+ # }
876+
877+ # core.info(`Posted Discord release notification for ${release.tag_name || releaseTag}.`);
877878
878879 cleanup-failed-release :
879880 name : Remove release and tag if build failed
0 commit comments