forked from wakatime/macos-wakatime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
119 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,7 +171,7 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
- | ||
# Run only for main branch | ||
# Run only for main branch (aka develop) | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
name: Changelog for main | ||
uses: gandarez/[email protected] | ||
|
@@ -201,6 +201,39 @@ jobs: | |
with: | ||
name: app | ||
path: ./ | ||
- | ||
name: Prepare release folder | ||
id: prepare | ||
run: | | ||
mkdir release | ||
mv ./WakaTime.zip release/ | ||
- | ||
name: Prepare Sparkle update creation | ||
env: | ||
SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY }} | ||
run: | | ||
echo -n "$SPARKLE_PRIVATE_KEY" > ./bin/sparkle/sparkle_private_key | ||
- | ||
name: Extract latest changes | ||
id: latest_changes | ||
run: | | ||
python3 ./bin/sparkle/generate_latest_changes.py | ||
echo "${{ needs.version.outputs.semver_tag }}" >> title | ||
- | ||
name: Generate Sparkle notes | ||
run: | | ||
pip3 install -r ./bin/sparkle/requirements.txt | ||
python3 ./bin/sparkle/generate_html_for_sparkle_release.py | ||
mv release/latest_changes.html release/WakaTime.html | ||
- | ||
name: Update appcast | ||
run: | | ||
./bin/sparkle/generate_appcast \ | ||
--ed-key-file ./bin/sparkle/sparkle_private_key \ | ||
--link https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}/releases \ | ||
--download-url-prefix https://github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}/releases/download/${{ needs.version.outputs.semver_tag }}/ \ | ||
-o release/appcast.xml \ | ||
release/ | ||
- | ||
name: "Create release" | ||
uses: softprops/action-gh-release@master | ||
|
@@ -211,7 +244,9 @@ jobs: | |
prerelease: ${{ needs.version.outputs.is_prerelease }} | ||
target_commitish: ${{ github.sha }} | ||
draft: false | ||
files: ./WakaTime.zip | ||
files: | | ||
./release/WakaTime.zip | ||
./release/appcast.xml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"lldb.library": "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/LLDB", | ||
"githubPullRequests.ignoredPullRequestBranches": [ | ||
"main" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
WakaTime is written and maintained by Alan Hamlett and | ||
various contributors: | ||
WakaTime is written and maintained by Alan Hamlett and various contributors: | ||
|
||
- Alan Hamlett <[email protected]> | ||
- Carlos Henrique Gandarez <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict/> | ||
</plist> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
# Takes as input two files: | ||
# 1. File "title" contains the title of the release | ||
# 2. File "latest_changes" contains the latest changes in the release in markdown format | ||
|
||
# The output is a file "release/latest_changes.html" which contains the latest changes in html format | ||
|
||
import markdown | ||
|
||
def generate_html_for_latest_changes(): | ||
with open('title', 'r') as f: | ||
title = f.read() | ||
with open('latest_changes', 'r') as f: | ||
changes = f.read() | ||
|
||
text = '# ' + title + '\n\n' + changes | ||
html = markdown.markdown(text) | ||
|
||
with open('release/latest_changes.html', 'w') as f: | ||
f.write(html) | ||
|
||
if __name__ == '__main__': | ||
generate_html_for_latest_changes() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
# look at file changelog.txt, take all bullet points under the top header. | ||
|
||
def get_changelog_notes(): | ||
with open('changelog.txt', 'r') as f: | ||
lines = f.readlines() | ||
lines = lines[1:] | ||
latest_changes = "" | ||
for line in lines: | ||
line = line.strip() | ||
if line == "": | ||
continue | ||
if not line.startswith('-'): | ||
line = "- " + line | ||
latest_changes += line + "\n" | ||
return latest_changes | ||
|
||
if __name__ == '__main__': | ||
latest_changes = get_changelog_notes() | ||
print(latest_changes) | ||
# write value to a file | ||
with open('latest_changes', 'w') as f: | ||
f.write(latest_changes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
markdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters