1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-21 13:47:39 +02:00

feat: ability to run npm release from branch (#10120)

This is to be able to release 7.0.0 from the branch 7.0, due to this
failed job
https://github.com/Unleash/unleash/actions/runs/15586992840/job/43895801674

Failure was because package.json already had 7.0.0 and I don't want to
use --force
This commit is contained in:
Gastón Fournier 2025-06-11 16:22:09 +02:00 committed by GitHub
parent 26791cbd66
commit 07998e5588
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,11 @@
name: 'Publish to npm'
on:
workflow_dispatch:
inputs:
version:
description: "Which version number should we use for the release"
type: 'string'
required: true
workflow_call:
inputs:
version:

View File

@ -1,9 +1,10 @@
const semver = require('semver');
import semver from 'semver';
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
const { version } = require('../package.json');
const latestUnleashVersion = process.argv[2];
const version = require('../package.json').version;
function isPrerelease(version) {
const arr = semver.prerelease(version);
return arr && arr.length > 0;