Skip to content

Commit

Permalink
configure CI
Browse files Browse the repository at this point in the history
  • Loading branch information
wereturtle committed Jun 18, 2022
1 parent d01cfcd commit acd822d
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 13 deletions.
28 changes: 17 additions & 11 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
"hooks": {},
"git": {
"changelog": null,
"requireCleanWorkingDir": true,
"requireBranch": false,
"requireCleanWorkingDir": false,
"requireUpstream": true,
"requireCommits": false,
"addUntrackedFiles": false,
"requireCommits": true,
"addUntrackedFiles": true,
"commit": true,
"commitMessage": "Release ${version}",
"commitArgs": [],
Expand All @@ -16,20 +15,22 @@
"tagArgs": [],
"push": true,
"pushArgs": ["--follow-tags"],
"pushRepo": ""
"pushRepo": "",
"requireBranch": "master"
},
"github": {
"release": false,
"releaseName": "Release ${version}",
"releaseNotes": null,
"release": true,
"releaseName": "ghostwriter ${version}",
"releaseNotes": "./releaseNotes.py ${version}",
"preRelease": false,
"draft": false,
"draft": true,
"tokenRef": "GITHUB_TOKEN",
"assets": null,
"assets": ["COPYING", "CHANGELOG.md"],
"host": null,
"timeout": 0,
"proxy": null,
"skipChecks": false
"skipChecks": false,
"web": true
},
"plugins": {
"@j-ulrich/release-it-regex-bumper": {
Expand Down Expand Up @@ -75,6 +76,11 @@
"file": "appveyor.yml",
"search": "appver:.*",
"replace": "appver: {{version}}"
},
{
"file": "CHANGELOG.md",
"search": "\\[Unreleased\\].*",
"replace": "[{{version}}] - {{now:YYYY-MM-DD}}"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ artifacts:
deploy:
tag: $(appver)
release: $(APPVEYOR_PROJECT_NAME) $(appver)
draft: true
draft: false
provider: GitHub
auth_token:
secure: BwAh7GBWfGp5VD1+HS20if8Y0QWVHM5ldypiUtDACIt3eVpEdaNvqCfao5ZIMD2C
secure: B+un2fzPlu2vLk0lPKh+QkcpVEU5xGc/g4sRFCXnaKp5b1CpQeYKE8xZmJRMXf6l
artifact: $(portable_dir).zip
force_update: true
on:
Expand Down
31 changes: 31 additions & 0 deletions releaseNotes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/python

import sys

if len(sys.argv) != 2:
print("Missing or invalid arguments.")
print("Please provide release version number.")
exit(1)

version = sys.argv[1]

changelog = open('CHANGELOG.md', 'r')
lines = changelog.readlines()

currentRelease = False

print("## Release Notes")

for line in lines:
if not currentRelease and line.startswith("## ["):
currentRelease = True
elif currentRelease:
if line.startswith("## ["):
break # All done!
else:
print(line.rstrip())

print("## Downloads")
print("")
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)')

0 comments on commit acd822d

Please sign in to comment.