Skip to content

Commit acd822d

Browse files
committed
configure CI
1 parent d01cfcd commit acd822d

File tree

3 files changed

+50
-13
lines changed

3 files changed

+50
-13
lines changed

.release-it.json

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
"hooks": {},
33
"git": {
44
"changelog": null,
5-
"requireCleanWorkingDir": true,
6-
"requireBranch": false,
5+
"requireCleanWorkingDir": false,
76
"requireUpstream": true,
8-
"requireCommits": false,
9-
"addUntrackedFiles": false,
7+
"requireCommits": true,
8+
"addUntrackedFiles": true,
109
"commit": true,
1110
"commitMessage": "Release ${version}",
1211
"commitArgs": [],
@@ -16,20 +15,22 @@
1615
"tagArgs": [],
1716
"push": true,
1817
"pushArgs": ["--follow-tags"],
19-
"pushRepo": ""
18+
"pushRepo": "",
19+
"requireBranch": "master"
2020
},
2121
"github": {
22-
"release": false,
23-
"releaseName": "Release ${version}",
24-
"releaseNotes": null,
22+
"release": true,
23+
"releaseName": "ghostwriter ${version}",
24+
"releaseNotes": "./releaseNotes.py ${version}",
2525
"preRelease": false,
26-
"draft": false,
26+
"draft": true,
2727
"tokenRef": "GITHUB_TOKEN",
28-
"assets": null,
28+
"assets": ["COPYING", "CHANGELOG.md"],
2929
"host": null,
3030
"timeout": 0,
3131
"proxy": null,
32-
"skipChecks": false
32+
"skipChecks": false,
33+
"web": true
3334
},
3435
"plugins": {
3536
"@j-ulrich/release-it-regex-bumper": {
@@ -75,6 +76,11 @@
7576
"file": "appveyor.yml",
7677
"search": "appver:.*",
7778
"replace": "appver: {{version}}"
79+
},
80+
{
81+
"file": "CHANGELOG.md",
82+
"search": "\\[Unreleased\\].*",
83+
"replace": "[{{version}}] - {{now:YYYY-MM-DD}}"
7884
}
7985
]
8086
}

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ artifacts:
4444
deploy:
4545
tag: $(appver)
4646
release: $(APPVEYOR_PROJECT_NAME) $(appver)
47-
draft: true
47+
draft: false
4848
provider: GitHub
4949
auth_token:
50-
secure: BwAh7GBWfGp5VD1+HS20if8Y0QWVHM5ldypiUtDACIt3eVpEdaNvqCfao5ZIMD2C
50+
secure: B+un2fzPlu2vLk0lPKh+QkcpVEU5xGc/g4sRFCXnaKp5b1CpQeYKE8xZmJRMXf6l
5151
artifact: $(portable_dir).zip
5252
force_update: true
5353
on:

releaseNotes.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/python
2+
3+
import sys
4+
5+
if len(sys.argv) != 2:
6+
print("Missing or invalid arguments.")
7+
print("Please provide release version number.")
8+
exit(1)
9+
10+
version = sys.argv[1]
11+
12+
changelog = open('CHANGELOG.md', 'r')
13+
lines = changelog.readlines()
14+
15+
currentRelease = False
16+
17+
print("## Release Notes")
18+
19+
for line in lines:
20+
if not currentRelease and line.startswith("## ["):
21+
currentRelease = True
22+
elif currentRelease:
23+
if line.startswith("## ["):
24+
break # All done!
25+
else:
26+
print(line.rstrip())
27+
28+
print("## Downloads")
29+
print("")
30+
print(r'[![ubuntu](https://img.shields.io/static/v1?label=&color=purple&logo=ubuntu&message=Ubuntu&style=for-the-badge)](https://launchpad.net/~wereturtle/+archive/ubuntu/ppa) [![fedora](https://img.shields.io/static/v1?label=&color=blue&logo=fedora&message=Fedora&style=for-the-badge)](https://copr.fedorainfracloud.org/coprs/wereturtle/stable/) [![Windows](https://img.shields.io/static/v1?label=&color=blue&logo=windows&message=Windows&style=for-the-badge)](https://github.com/wereturtle/ghostwriter/releases/download/' + version + r'/ghostwriter_' + version + r'_win64_portable.zip)')
31+

0 commit comments

Comments
 (0)