mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 05:46:16 +00:00
build(Needs bump): fix webhook not triggering
This commit is contained in:
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@@ -50,22 +50,11 @@ jobs:
|
|||||||
- name: Setup Docker Buildx
|
- name: Setup Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Build and release
|
- name: Build, release, publish
|
||||||
env:
|
env:
|
||||||
RELEASE_WORKFLOW_STEP: release
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
DOCKER_REGISTRY_USER: ${{ github.repository_owner }}
|
DOCKER_REGISTRY_USER: ${{ github.repository_owner }}
|
||||||
DOCKER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
DOCKER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
||||||
DEBUG: semantic-release:*
|
|
||||||
run: bunx multi-semantic-release --debug
|
|
||||||
|
|
||||||
# We call multi-semantic-release twice to publish in a different step
|
|
||||||
# An environment variable determines which plugins in the config to run
|
|
||||||
- name: Trigger Portainer webhooks
|
|
||||||
if: github.ref == 'refs/heads/main'
|
|
||||||
env:
|
|
||||||
RELEASE_WORKFLOW_STEP: publish
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
WEBSOCKET_API_PORTAINER_WEBHOOK_URL: ${{ secrets.WEBSOCKET_API_PORTAINER_WEBHOOK_URL }}
|
WEBSOCKET_API_PORTAINER_WEBHOOK_URL: ${{ secrets.WEBSOCKET_API_PORTAINER_WEBHOOK_URL }}
|
||||||
DISCORD_BOT_PORTAINER_WEBHOOK_URL: ${{ secrets.DISCORD_BOT_PORTAINER_WEBHOOK_URL }}
|
DISCORD_BOT_PORTAINER_WEBHOOK_URL: ${{ secrets.DISCORD_BOT_PORTAINER_WEBHOOK_URL }}
|
||||||
run: bunx multi-semantic-release
|
run: bunx multi-semantic-release
|
||||||
|
|||||||
@@ -1,32 +1,28 @@
|
|||||||
import defineSubprojectReleaseConfig from '../../semantic-release-config.js'
|
import defineSubprojectReleaseConfig from '../../semantic-release-config.js'
|
||||||
|
|
||||||
export default defineSubprojectReleaseConfig({
|
export default defineSubprojectReleaseConfig({
|
||||||
plugins:
|
plugins: [
|
||||||
process.env.RELEASE_WORKFLOW_STEP === 'publish'
|
[
|
||||||
? [
|
'@codedependant/semantic-release-docker',
|
||||||
[
|
{
|
||||||
'@semantic-release/exec',
|
dockerImage: 'revanced-bot-websocket-api',
|
||||||
{
|
dockerRegistry: 'ghcr.io',
|
||||||
publishCmd: 'bun run scripts/trigger-portainer-webhook.ts',
|
dockerProject: 'revanced',
|
||||||
},
|
dockerContext: '../..',
|
||||||
],
|
dockerPlatform: ['linux/amd64', 'linux/arm64'],
|
||||||
]
|
dockerBuildQuiet: false,
|
||||||
: [
|
dockerTags: [
|
||||||
[
|
'{{#if prerelease.[0]}}dev{{else}}main{{/if}}',
|
||||||
'@codedependant/semantic-release-docker',
|
'{{#unless prerelease.[0]}}latest{{/unless}}',
|
||||||
{
|
'{{version}}',
|
||||||
dockerImage: 'revanced-bot-websocket-api',
|
],
|
||||||
dockerRegistry: 'ghcr.io',
|
},
|
||||||
dockerProject: 'revanced',
|
],
|
||||||
dockerContext: '../..',
|
[
|
||||||
dockerPlatform: ['linux/amd64', 'linux/arm64'],
|
'@semantic-release/exec',
|
||||||
dockerBuildQuiet: false,
|
{
|
||||||
dockerTags: [
|
successCmd: 'bun run scripts/trigger-portainer-webhook.ts',
|
||||||
'{{#if prerelease.[0]}}dev{{else}}main{{/if}}',
|
},
|
||||||
'{{#unless prerelease.[0]}}latest{{/unless}}',
|
],
|
||||||
'{{version}}',
|
],
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,32 +1,28 @@
|
|||||||
import defineSubprojectReleaseConfig from '../../semantic-release-config.js'
|
import defineSubprojectReleaseConfig from '../../semantic-release-config.js'
|
||||||
|
|
||||||
export default defineSubprojectReleaseConfig({
|
export default defineSubprojectReleaseConfig({
|
||||||
plugins:
|
plugins: [
|
||||||
process.env.RELEASE_WORKFLOW_STEP === 'publish'
|
[
|
||||||
? [
|
'@codedependant/semantic-release-docker',
|
||||||
[
|
{
|
||||||
'@semantic-release/exec',
|
dockerImage: 'revanced-bot-discord',
|
||||||
{
|
dockerRegistry: 'ghcr.io',
|
||||||
publishCmd: 'bun run scripts/trigger-portainer-webhook.ts',
|
dockerProject: 'revanced',
|
||||||
},
|
dockerContext: '../..',
|
||||||
],
|
dockerPlatform: ['linux/amd64', 'linux/arm64'],
|
||||||
]
|
dockerBuildQuiet: false,
|
||||||
: [
|
dockerTags: [
|
||||||
[
|
'{{#if prerelease.[0]}}dev{{else}}main{{/if}}',
|
||||||
'@codedependant/semantic-release-docker',
|
'{{#unless prerelease.[0]}}latest{{/unless}}',
|
||||||
{
|
'{{version}}',
|
||||||
dockerImage: 'revanced-bot-discord',
|
],
|
||||||
dockerRegistry: 'ghcr.io',
|
},
|
||||||
dockerProject: 'revanced',
|
],
|
||||||
dockerContext: '../..',
|
[
|
||||||
dockerPlatform: ['linux/amd64', 'linux/arm64'],
|
'@semantic-release/exec',
|
||||||
dockerBuildQuiet: false,
|
{
|
||||||
dockerTags: [
|
successCmd: 'bun run scripts/trigger-portainer-webhook.ts',
|
||||||
'{{#if prerelease.[0]}}dev{{else}}main{{/if}}',
|
},
|
||||||
'{{#unless prerelease.[0]}}latest{{/unless}}',
|
],
|
||||||
'{{version}}',
|
],
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,55 +11,52 @@ const Options = {
|
|||||||
prerelease: true,
|
prerelease: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
plugins:
|
plugins: [
|
||||||
process.env['RELEASE_WORKFLOW_STEP'] !== 'publish'
|
[
|
||||||
? [
|
'@semantic-release/commit-analyzer',
|
||||||
[
|
{
|
||||||
'@semantic-release/commit-analyzer',
|
releaseRules: [{ type: 'build', scope: 'Needs bump', release: 'patch' }],
|
||||||
{
|
},
|
||||||
releaseRules: [{ type: 'build', scope: 'Needs bump', release: 'patch' }],
|
],
|
||||||
},
|
'@semantic-release/release-notes-generator',
|
||||||
],
|
'@semantic-release/changelog',
|
||||||
'@semantic-release/release-notes-generator',
|
[
|
||||||
'@semantic-release/changelog',
|
'@semantic-release/npm',
|
||||||
[
|
{
|
||||||
'@semantic-release/npm',
|
npmPublish: false,
|
||||||
{
|
},
|
||||||
npmPublish: false,
|
],
|
||||||
},
|
[
|
||||||
],
|
'@semantic-release/git',
|
||||||
[
|
{
|
||||||
'@semantic-release/git',
|
assets: ['CHANGELOG.md', 'package.json', '../../bun.lockb'],
|
||||||
{
|
},
|
||||||
assets: ['CHANGELOG.md', 'package.json', '../../bun.lockb'],
|
],
|
||||||
},
|
[
|
||||||
],
|
'@semantic-release/github',
|
||||||
[
|
{
|
||||||
'@semantic-release/github',
|
assets: [
|
||||||
{
|
{
|
||||||
assets: [
|
path: 'dist/*',
|
||||||
{
|
},
|
||||||
path: 'dist/*',
|
],
|
||||||
},
|
successComment: false,
|
||||||
],
|
},
|
||||||
successComment: false,
|
],
|
||||||
},
|
// This unfortunately has to run multiple times, even though it needs to run only once.
|
||||||
],
|
[
|
||||||
// This unfortunately has to run multiple times, even though it needs to run only once.
|
'@saithodev/semantic-release-backmerge',
|
||||||
[
|
{
|
||||||
'@saithodev/semantic-release-backmerge',
|
backmergeBranches: [
|
||||||
{
|
{
|
||||||
backmergeBranches: [
|
from: 'main',
|
||||||
{
|
to: 'dev',
|
||||||
from: 'main',
|
},
|
||||||
to: 'dev',
|
],
|
||||||
},
|
clearWorkspace: true,
|
||||||
],
|
},
|
||||||
clearWorkspace: true,
|
],
|
||||||
},
|
],
|
||||||
],
|
|
||||||
]
|
|
||||||
: [],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -70,6 +67,6 @@ export default function defineSubprojectReleaseConfig(subprojectOptions) {
|
|||||||
return {
|
return {
|
||||||
...Options,
|
...Options,
|
||||||
...subprojectOptions,
|
...subprojectOptions,
|
||||||
plugins: [...(subprojectOptions.plugins || []), ...(Options.plugins || [])],
|
plugins: [...(Options.plugins || []), ...(subprojectOptions.plugins || [])],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user