Skip to content
Snippets Groups Projects
Unverified Commit d4d24b71 authored by Michael Kriese's avatar Michael Kriese Committed by GitHub
Browse files

build: prepare maintenance releases (#9671)

parent 70fcb41c
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ on: ...@@ -4,6 +4,7 @@ on:
push: push:
branches: branches:
- master - master
- v24
workflow_dispatch: workflow_dispatch:
......
...@@ -51,6 +51,6 @@ jobs: ...@@ -51,6 +51,6 @@ jobs:
- name: Publish ${{ github.event.client_payload.version }} - name: Publish ${{ github.event.client_payload.version }}
run: | run: |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ~/.npmrc echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ~/.npmrc
npm publish npm publish --tag ${{ github.event.client_payload.tag }}
env: env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"@semantic-release/exec", "@semantic-release/exec",
{ {
"verifyConditionsCmd": "run-s verify", "verifyConditionsCmd": "run-s verify",
"publishCmd": "run-s \"release -- {@}\" -- --release=${nextRelease.version} --sha=${nextRelease.gitHead}" "publishCmd": "run-s \"release -- {@}\" -- --release=${nextRelease.version} --sha=${nextRelease.gitHead} --tag=${nextRelease.channel}"
} }
] ]
], ],
...@@ -82,5 +82,15 @@ ...@@ -82,5 +82,15 @@
} }
] ]
}, },
"tagFormat": "${version}" "tagFormat": "${version}",
"branches": [
{
"name": "v24",
"range": "24.x",
"channel": "v24"
},
{
"name": "master"
}
]
} }
import got from 'got'; import got from 'got';
import shell from 'shelljs'; import shell from 'shelljs';
import { program } from './utils.mjs'; import { options } from './utils.mjs';
const version = program.release; const version = options.release;
const dry = program.dryRun; const tag = options.tag;
const dry = options.dryRun;
shell.echo(`Dispatching version: ${version}`); shell.echo(`Dispatching version: ${version}`);
...@@ -27,6 +28,7 @@ shell.echo(`Dispatching version: ${version}`); ...@@ -27,6 +28,7 @@ shell.echo(`Dispatching version: ${version}`);
sha: process.env.GITHUB_SHA, sha: process.env.GITHUB_SHA,
ref: process.env.GITHUB_REF, ref: process.env.GITHUB_REF,
version, version,
tag,
}, },
}, },
} }
......
import shell from 'shelljs'; import shell from 'shelljs';
import { program } from './utils.mjs'; import { options } from './utils.mjs';
const version = program.release; const version = options.release;
// const sha = program.sha; // const sha = program.sha;
// let err = false; // let err = false;
......
...@@ -5,11 +5,14 @@ const program = new commander.Command(); ...@@ -5,11 +5,14 @@ const program = new commander.Command();
program program
.version('0.0.1') .version('0.0.1')
.requiredOption('-r, --release <type>', 'Version to use') .requiredOption('-r, --release <type>', 'Version to use')
.option('-s, --sha <type>', 'Sha to use') .option('-s, --sha <type>', 'Git sha to use')
.option('-t, --tag <type>', 'Npm dist-tag to publish to', 'latest')
.option('-d, --dry-run'); .option('-d, --dry-run');
program.parse(process.argv); program.parse(process.argv);
export const options = program.opts();
export { program }; export { program };
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment