Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Borwe committed Sep 1, 2023
1 parent d0ed8c6 commit c544c53
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 1 deletion.
124 changes: 124 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
name: Push Build

on: push

jobs:
build:
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- {
name: "Linux Build & Test",
os: ubuntu-latest
}
- {
name: "Microsoft Windows Build & Test",
os: windows-latest
}
- {
name: "MacOs Build & Test",
os: macos-latest
}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Go build
run: |
go build
- name: Zip file Unix
if: matrix.config.os != 'windows-latest'
run: |
zip -r ./wakarizer_${{matrix.config.os}}.zip ./wakarizer
- name: Zip file Windows
if: matrix.config.os == 'windows-latest'
run: |
tar -cf ./wakarizer_${{matrix.config.os}}.zip ./wakarizer.exe
- uses: "actions/upload-artifact@v2"
id: upload_artifact
with:
path: ./wakarizer_${{matrix.config.os}}.zip
name: wakarizer_${{matrix.config.os}}.zip

release:
if: contains(github.ref, 'tags/v')
needs: build
runs-on: ubuntu-latest

steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Store Release url
run: |
echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url
- uses: actions/upload-artifact@v1
with:
path: ./upload_url
name: upload_url


publish:
needs: release
if: contains(github.ref, 'tags/v')
name: ${{ matrix.config.name }}
runs-on: ubuntu-latest
strategy:
matrix:
config:
- {
name: "Linux Release",
os: ubuntu-latest
}
- {
name: "Microsoft Windows Release",
os: windows-latest
}
- {
name: "MacOs Release",
os: macos-latest
}
steps:
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: wakarizer_${{matrix.config.os}}.zip
path: ./

- name: Download URL
uses: actions/download-artifact@v1
with:
name: upload_url
path: ./

- name: Set Upload URL
id: set_upload_url
run: |
upload_url=`cat ./upload_url`
echo ::set-output name=upload_url::$upload_url
- name: Upload to Release
id: upload_to_release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.set_upload_url.outputs.upload_url }}
asset_path: ./wakarizer_${{matrix.config.os}}.zip
asset_name: wakarizer_${{matrix.config.os}}.zip
asset_content_type: application/zip
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# **<center>:clock1:<u>WAKARIZER</u>:clock1:**</center>
# <html>**<center>:clock1:<u>WAKARIZER</u>:clock1:**</center></html>

## Reason:

In my country Kenya it's quite common for people to post the wakatimes (time spent coding on editors), and came across this [X post](https://twitter.com/SamProgramiz/status/1696655932661387414) and one of it's [comments](https://twitter.com/Shifu_the_great/status/1696730247910109406) and was like, won't it be a fun project to make it possible for people to clock 24 hours coding times a day, LOL!

## Goal:

Expand All @@ -8,6 +12,15 @@ Hacking wakatime :laughing::sweat_smile: and learning Go.

It is a TUI application written in go using [Bubbletea](https://github.com/charmbracelet/bubbletea) library that once executed will produce heartbeats of the programming languages the user inputs when prompted and keep running forever until user explicitly closes the application.

With Go awesomeness, was able to use the [wakatime-cli](https://github.com/wakatime/wakatime-cli/) as if it was a library, and calling functions from inside it.



# Similarities with wakatime-cli

- Everything is pretty much similar, except this executable doesn't take any arguments, and interactions is via the TUI.
- Default cfg of wakatime is `~/.wakatime.cfg` but this one is `~/.wakarizer.cfg`



## Contributions:
Expand Down

0 comments on commit c544c53

Please sign in to comment.