Skip to content

Commit c5ecded

Browse files
authored
Merge pull request #23 from rajatjindal/use-alternate-deployment
Use alternate deployment and upload plugin json always
2 parents 9d2d08e + 10bb208 commit c5ecded

File tree

3 files changed

+28
-22
lines changed

3 files changed

+28
-22
lines changed

.github/workflows/pr-check-dist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
- uses: actions/setup-node@v4
1616
with:
17-
node-version: 20
17+
node-version: 22.1.0
1818

1919
- name: npm install
2020
run: npm install

dist/index.js

Lines changed: 13 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/release.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import {Buffer} from 'buffer'
99
import {Octokit} from '@octokit/rest'
1010
import toml from 'toml'
1111

12-
const RELEASE_BOT_WEBHOOK_URL = 'https://spin-plugin-releaser.fermyon.app'
12+
// until https://github.com/fermyon/spin/issues/2905 can be fixed/deployed
13+
// on Fermyon cloud, use the deployment on my personal k8s cluster.
14+
// const RELEASE_BOT_WEBHOOK_URL = 'https://spin-plugin-releaser.fermyon.app'
15+
const RELEASE_BOT_WEBHOOK_URL = 'https://spinpluginreleasebot.rajatjindal.com'
1316

1417
interface MustacheView {
1518
TagName: string
@@ -139,17 +142,17 @@ async function run(): Promise<void> {
139142
})
140143
}
141144

142-
if (tagName === 'canary') {
143-
core.info('uploading asset to canary release')
144-
await octokit.rest.repos.uploadReleaseAsset({
145-
owner: github.context.repo.owner,
146-
repo: github.context.repo.repo,
147-
release_id: release.id,
148-
name: `${manifest.name}.json`,
149-
data: rendered
150-
})
145+
core.info('uploading plugin json file as an asset to release')
146+
await octokit.rest.repos.uploadReleaseAsset({
147+
owner: github.context.repo.owner,
148+
repo: github.context.repo.repo,
149+
release_id: release.id,
150+
name: `${manifest.name}.json`,
151+
data: rendered
152+
})
151153

152-
core.info(`added ${manifest.name}.json file to release ${tagName}`)
154+
core.info(`added ${manifest.name}.json file to release ${tagName}`)
155+
if (tagName === 'canary') {
153156
return
154157
}
155158

0 commit comments

Comments
 (0)