Skip to content

Commit 83a2d08

Browse files
authored
Merge pull request #39 from meza/fixing-release
Fixing release
2 parents 5500342 + 7a3b3b5 commit 83a2d08

File tree

6 files changed

+5809
-4850
lines changed

6 files changed

+5809
-4850
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
uses: actions/checkout@v2
5555
with:
5656
fetch-depth: 0
57+
persist-credentials: false
5758
- name: Cache multiple paths
5859
uses: actions/cache@v2
5960
with:
@@ -80,7 +81,8 @@ jobs:
8081
node-version: ${{ matrix.node-version }}
8182
cache: 'yarn'
8283

83-
- run: yarn --pure-lockfile --offline
84+
- name: Install deps
85+
run: yarn --pure-lockfile --offline
8486

8587
- name: Release
8688
env:

.releaserc.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
{
2+
"branches": [
3+
"+([0-9])?(.{+([0-9]),x}).x",
4+
"main",
5+
"next",
6+
{
7+
"name": "beta",
8+
"prerelease": true
9+
},
10+
{
11+
"name": "alpha",
12+
"prerelease": true
13+
}
14+
],
215
"plugins": [
3-
"@semantic-release/npm",
416
"@semantic-release/commit-analyzer",
517
"@semantic-release/release-notes-generator",
618
[
@@ -9,20 +21,7 @@
921
"changelogFile": "docs/CHANGELOG.md"
1022
}
1123
],
12-
[
13-
"@semantic-release/git",
14-
{
15-
"assets": [
16-
"CHANGELOG.md"
17-
]
18-
}
19-
],
20-
[
21-
"@semantic-release/git",
22-
{
23-
"assets": ["CHANGELOG.md"]
24-
}
25-
],
24+
"@semantic-release/npm",
2625
[
2726
"@semantic-release/github",
2827
{
@@ -36,6 +35,7 @@
3635
"label": "ADR-Tools ${nextRelease.gitTag}"
3736
}
3837
]
39-
}]
38+
}
39+
]
4040
]
4141
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
"publishConfig": {
99
"access": "public"
1010
},
11+
"license": "MIT",
1112
"types": "dist/index.d.ts",
1213
"private": false,
1314
"scripts": {
14-
"prebuild": "node -p \"'export const LIB_VERSION = ' + require('./package.json').version + ';'\" > src/version.ts",
15+
"prepack": "./scripts/inject-version.sh ./src/version.ts && tsc",
1516
"build": "tsc",
17+
"postbuild": "",
1618
"start": "ts-node src/index.ts",
1719
"commit": "commit",
1820
"ci": "npm set editor '' && yarn lint && yarn test",
@@ -76,6 +78,7 @@
7678
"husky": "^8.0.1",
7779
"install-deps-postmerge": "^2.0.1",
7880
"mock-cwd": "^1.0.0",
81+
"node-jq": "^2.3.3",
7982
"semantic-release": "^19.0.3",
8083
"standard-version": "^9.3.2",
8184
"ts-node": "^10.8.1",

scripts/inject-version.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
PKG_VERSION=$(node -p "require('./package.json').version")
4+
echo "export const LIB_VERSION = '${PKG_VERSION}';\n" > $1

src/version.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
export const LIB_VERSION = '0.0.0';
1+
export const LIB_VERSION = '0.0.0-development';
2+

0 commit comments

Comments
 (0)