mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-04 13:48:56 +02:00
feat: ability to run npm release from branch
This commit is contained in:
parent
26791cbd66
commit
b18b16bc55
6
.github/workflows/release.yaml
vendored
6
.github/workflows/release.yaml
vendored
@ -1,5 +1,11 @@
|
|||||||
name: 'Publish to npm'
|
name: 'Publish to npm'
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: "Which version number should we use for the release"
|
||||||
|
type: 'string'
|
||||||
|
required: true
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
|
@ -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 latestUnleashVersion = process.argv[2];
|
||||||
|
|
||||||
const version = require('../package.json').version;
|
|
||||||
|
|
||||||
function isPrerelease(version) {
|
function isPrerelease(version) {
|
||||||
const arr = semver.prerelease(version);
|
const arr = semver.prerelease(version);
|
||||||
return arr && arr.length > 0;
|
return arr && arr.length > 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user