mirror of
https://github.com/semaphore-protocol/semaphore.git
synced 2026-01-09 14:48:12 -05:00
fix(ci): publish pkg if no releases yet (#900)
* fix(ci): publish pkg if no releases yet * chore(ci): add workflow release trigger * fix: workflow dispatch instead of workflow release
This commit is contained in:
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -4,6 +4,7 @@ permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
@@ -10,10 +10,12 @@ async function maybePushToSoldeer() {
|
||||
const response = await fetch(
|
||||
"https://api.soldeer.xyz/api/v1/revision?project_name=semaphore-protocol-contracts&limit=1"
|
||||
)
|
||||
const { data, status } = await response.json()
|
||||
const { data } = await response.json()
|
||||
|
||||
// fail status if no version published at all yet
|
||||
if (status === "fail" || compare(contractsLocalVersion, data[0].version) === 1)
|
||||
if (
|
||||
data.length === 0 || // data = [] if no version has ever been published yet
|
||||
compare(contractsLocalVersion, data[0].version) === 1
|
||||
)
|
||||
execSync(`soldeer push semaphore-protocol-contracts~${contractsLocalVersion} packages/contracts/contracts`, {
|
||||
stdio: "inherit"
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user