mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-10 13:26: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
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and release
|
||||
- name: Build, release, publish
|
||||
env:
|
||||
RELEASE_WORKFLOW_STEP: release
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DOCKER_REGISTRY_USER: ${{ github.repository_owner }}
|
||||
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 }}
|
||||
DISCORD_BOT_PORTAINER_WEBHOOK_URL: ${{ secrets.DISCORD_BOT_PORTAINER_WEBHOOK_URL }}
|
||||
run: bunx multi-semantic-release
|
||||
|
||||
@@ -1,32 +1,28 @@
|
||||
import defineSubprojectReleaseConfig from '../../semantic-release-config.js'
|
||||
|
||||
export default defineSubprojectReleaseConfig({
|
||||
plugins:
|
||||
process.env.RELEASE_WORKFLOW_STEP === 'publish'
|
||||
? [
|
||||
[
|
||||
'@semantic-release/exec',
|
||||
{
|
||||
publishCmd: 'bun run scripts/trigger-portainer-webhook.ts',
|
||||
},
|
||||
],
|
||||
]
|
||||
: [
|
||||
[
|
||||
'@codedependant/semantic-release-docker',
|
||||
{
|
||||
dockerImage: 'revanced-bot-websocket-api',
|
||||
dockerRegistry: 'ghcr.io',
|
||||
dockerProject: 'revanced',
|
||||
dockerContext: '../..',
|
||||
dockerPlatform: ['linux/amd64', 'linux/arm64'],
|
||||
dockerBuildQuiet: false,
|
||||
dockerTags: [
|
||||
'{{#if prerelease.[0]}}dev{{else}}main{{/if}}',
|
||||
'{{#unless prerelease.[0]}}latest{{/unless}}',
|
||||
'{{version}}',
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
plugins: [
|
||||
[
|
||||
'@codedependant/semantic-release-docker',
|
||||
{
|
||||
dockerImage: 'revanced-bot-websocket-api',
|
||||
dockerRegistry: 'ghcr.io',
|
||||
dockerProject: 'revanced',
|
||||
dockerContext: '../..',
|
||||
dockerPlatform: ['linux/amd64', 'linux/arm64'],
|
||||
dockerBuildQuiet: false,
|
||||
dockerTags: [
|
||||
'{{#if prerelease.[0]}}dev{{else}}main{{/if}}',
|
||||
'{{#unless prerelease.[0]}}latest{{/unless}}',
|
||||
'{{version}}',
|
||||
],
|
||||
},
|
||||
],
|
||||
[
|
||||
'@semantic-release/exec',
|
||||
{
|
||||
successCmd: 'bun run scripts/trigger-portainer-webhook.ts',
|
||||
},
|
||||
],
|
||||
],
|
||||
})
|
||||
|
||||
@@ -1,32 +1,28 @@
|
||||
import defineSubprojectReleaseConfig from '../../semantic-release-config.js'
|
||||
|
||||
export default defineSubprojectReleaseConfig({
|
||||
plugins:
|
||||
process.env.RELEASE_WORKFLOW_STEP === 'publish'
|
||||
? [
|
||||
[
|
||||
'@semantic-release/exec',
|
||||
{
|
||||
publishCmd: 'bun run scripts/trigger-portainer-webhook.ts',
|
||||
},
|
||||
],
|
||||
]
|
||||
: [
|
||||
[
|
||||
'@codedependant/semantic-release-docker',
|
||||
{
|
||||
dockerImage: 'revanced-bot-discord',
|
||||
dockerRegistry: 'ghcr.io',
|
||||
dockerProject: 'revanced',
|
||||
dockerContext: '../..',
|
||||
dockerPlatform: ['linux/amd64', 'linux/arm64'],
|
||||
dockerBuildQuiet: false,
|
||||
dockerTags: [
|
||||
'{{#if prerelease.[0]}}dev{{else}}main{{/if}}',
|
||||
'{{#unless prerelease.[0]}}latest{{/unless}}',
|
||||
'{{version}}',
|
||||
],
|
||||
},
|
||||
],
|
||||
],
|
||||
plugins: [
|
||||
[
|
||||
'@codedependant/semantic-release-docker',
|
||||
{
|
||||
dockerImage: 'revanced-bot-discord',
|
||||
dockerRegistry: 'ghcr.io',
|
||||
dockerProject: 'revanced',
|
||||
dockerContext: '../..',
|
||||
dockerPlatform: ['linux/amd64', 'linux/arm64'],
|
||||
dockerBuildQuiet: false,
|
||||
dockerTags: [
|
||||
'{{#if prerelease.[0]}}dev{{else}}main{{/if}}',
|
||||
'{{#unless prerelease.[0]}}latest{{/unless}}',
|
||||
'{{version}}',
|
||||
],
|
||||
},
|
||||
],
|
||||
[
|
||||
'@semantic-release/exec',
|
||||
{
|
||||
successCmd: 'bun run scripts/trigger-portainer-webhook.ts',
|
||||
},
|
||||
],
|
||||
],
|
||||
})
|
||||
|
||||
@@ -11,55 +11,52 @@ const Options = {
|
||||
prerelease: true,
|
||||
},
|
||||
],
|
||||
plugins:
|
||||
process.env['RELEASE_WORKFLOW_STEP'] !== 'publish'
|
||||
? [
|
||||
[
|
||||
'@semantic-release/commit-analyzer',
|
||||
{
|
||||
releaseRules: [{ type: 'build', scope: 'Needs bump', release: 'patch' }],
|
||||
},
|
||||
],
|
||||
'@semantic-release/release-notes-generator',
|
||||
'@semantic-release/changelog',
|
||||
[
|
||||
'@semantic-release/npm',
|
||||
{
|
||||
npmPublish: false,
|
||||
},
|
||||
],
|
||||
[
|
||||
'@semantic-release/git',
|
||||
{
|
||||
assets: ['CHANGELOG.md', 'package.json', '../../bun.lockb'],
|
||||
},
|
||||
],
|
||||
[
|
||||
'@semantic-release/github',
|
||||
{
|
||||
assets: [
|
||||
{
|
||||
path: 'dist/*',
|
||||
},
|
||||
],
|
||||
successComment: false,
|
||||
},
|
||||
],
|
||||
// This unfortunately has to run multiple times, even though it needs to run only once.
|
||||
[
|
||||
'@saithodev/semantic-release-backmerge',
|
||||
{
|
||||
backmergeBranches: [
|
||||
{
|
||||
from: 'main',
|
||||
to: 'dev',
|
||||
},
|
||||
],
|
||||
clearWorkspace: true,
|
||||
},
|
||||
],
|
||||
]
|
||||
: [],
|
||||
plugins: [
|
||||
[
|
||||
'@semantic-release/commit-analyzer',
|
||||
{
|
||||
releaseRules: [{ type: 'build', scope: 'Needs bump', release: 'patch' }],
|
||||
},
|
||||
],
|
||||
'@semantic-release/release-notes-generator',
|
||||
'@semantic-release/changelog',
|
||||
[
|
||||
'@semantic-release/npm',
|
||||
{
|
||||
npmPublish: false,
|
||||
},
|
||||
],
|
||||
[
|
||||
'@semantic-release/git',
|
||||
{
|
||||
assets: ['CHANGELOG.md', 'package.json', '../../bun.lockb'],
|
||||
},
|
||||
],
|
||||
[
|
||||
'@semantic-release/github',
|
||||
{
|
||||
assets: [
|
||||
{
|
||||
path: 'dist/*',
|
||||
},
|
||||
],
|
||||
successComment: false,
|
||||
},
|
||||
],
|
||||
// This unfortunately has to run multiple times, even though it needs to run only once.
|
||||
[
|
||||
'@saithodev/semantic-release-backmerge',
|
||||
{
|
||||
backmergeBranches: [
|
||||
{
|
||||
from: 'main',
|
||||
to: 'dev',
|
||||
},
|
||||
],
|
||||
clearWorkspace: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,6 +67,6 @@ export default function defineSubprojectReleaseConfig(subprojectOptions) {
|
||||
return {
|
||||
...Options,
|
||||
...subprojectOptions,
|
||||
plugins: [...(subprojectOptions.plugins || []), ...(Options.plugins || [])],
|
||||
plugins: [...(Options.plugins || []), ...(subprojectOptions.plugins || [])],
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user