Skip to content

Commit a0b5cc7

Browse files
committed
Removed release script and releasing with provenance from github actions
1 parent 81fa074 commit a0b5cc7

File tree

4 files changed

+10
-103
lines changed

4 files changed

+10
-103
lines changed

.github/workflows/node.js.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,24 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
node-version: [18.x, 20.x]
17+
node-version: [20.x]
1818
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
1919

2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
- uses: pnpm/action-setup@v2
2323
with:
2424
version: 8
2525
- name: Use Node.js ${{ matrix.node-version }}
26-
uses: actions/setup-node@v3
26+
uses: actions/setup-node@v4
2727
with:
2828
node-version: ${{ matrix.node-version }}
2929
cache: 'pnpm'
3030
- name: Install Dependencies
3131
run: pnpm install --frozen-lockfile
3232
- run: npm run ci
33+
- name: Publish to NPM if version in package.json has changed
34+
uses: JS-DevTools/npm-publish@v3
35+
with:
36+
token: ${{ secrets.NPM_TOKEN }}
37+
provenance: true

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-assistant",
3-
"version": "0.65.7",
3+
"version": "0.66.7",
44
"description": "Combines and integrates professional Typescript tools into your project",
55
"main": "dist/index.js",
66
"bin": {
@@ -14,8 +14,7 @@
1414
"prepare": "npm run fix:hooks",
1515
"prepublishOnly": "tsc -b ./src/tsconfig.json",
1616
"assist": "ts-node --transpile-only src/index.ts",
17-
"prerelease": "ts-node --transpile-only src/index ci --no-format",
18-
"release": "ts-node --transpile-only src/index.ts release",
17+
"release": "echo 'You can release by updating the version in package.json and pushing'",
1918
"fix": "ts-node --transpile-only src/index fix",
2019
"fixall": "ts-node --transpile-only src/index fixall",
2120
"clean": "ts-node --transpile-only src/index clean",

src/commands/release.ts

Lines changed: 0 additions & 79 deletions
This file was deleted.

src/index.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { createPostCheckoutCommand } from "./commands/post-checkout";
1414
import { createPostMergeCommand } from "./commands/post-merge";
1515
import { createPreCommitCommand } from "./commands/pre-commit";
1616
import { createPrePushCommand } from "./commands/pre-push";
17-
import { createReleaseCommand } from "./commands/release";
1817
import { createDependencyInjector } from "./dependency-injector";
1918

2019
/* eslint-disable no-console */
@@ -123,23 +122,6 @@ yargsModule.command(
123122
}
124123
);
125124

126-
yargsModule.command(
127-
["release"],
128-
"Interactively makes a new version number, tags, pushes and publishes to npm",
129-
{
130-
otp: {
131-
describe: "one time password for the release",
132-
string: true,
133-
optional: true,
134-
},
135-
},
136-
(yargs) => {
137-
inject(createReleaseCommand)
138-
.execute({ otp: yargs.otp })
139-
.then(onSuccess, onFailure);
140-
}
141-
);
142-
143125
yargsModule.command(
144126
["ci"],
145127
"Runs all tools in parallel to find errors",

0 commit comments

Comments
 (0)