Skip to content

Commit

Permalink
Create watchface
Browse files Browse the repository at this point in the history
  • Loading branch information
guyou committed May 18, 2021
0 parents commit d92aacb
Show file tree
Hide file tree
Showing 8 changed files with 186 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release-on-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Upload Release Asset

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Version name
id: version_name
run: |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Create archive
id: create-archive
run: |
tar czvf archive.tar.gz watchface_dial.png watchface_theme.json
- name: Upload Compressed Asset
id: upload-compressed-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./archive.tar.gz
asset_name: watchface.tar.gz
asset_content_type: application/gzip
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
all:
tar czvf watchface.tar.gz watchface_dial.png watchface_theme.json
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## References

* https://github.com/mawob/bttfWatch
Binary file added watchface_dial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
139 changes: 139 additions & 0 deletions watchface_theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"dial": {
"enable": true,
"x_offset": 0,
"y_offset": 0
},
"label": [
{
"enable": true,
"type": "date",
"label": "%H",
"font": "LCD",
"font_color": "#f60101",
"font_size": 32,
"align": "center",
"x_offset": 65,
"y_offset": 34,
"x_size": 50,
"y_size": 37
},
{
"enable": true,
"type": "date",
"label": "%M",
"font": "LCD",
"font_color": "#f60101",
"font_size": 32,
"align": "center",
"x_offset": 125,
"y_offset": 34,
"x_size": 50,
"y_size": 37
},
{
"enable": true,
"type": "date",
"label": "%S",
"font": "LCD",
"font_color": "#f60101",
"font_size": 16,
"align": "center",
"x_offset": 181,
"y_offset": 50,
"x_size": 34,
"y_size": 22
},
{
"enable": true,
"type": "date",
"label": "%Y",
"font": "LCD",
"font_color": "#03f905",
"font_size": 16,
"align": "center",
"x_offset": 172,
"y_offset": 113,
"x_size": 59,
"y_size": 22
},
{
"enable": true,
"type": "date",
"label": "%a",
"font": "LCD",
"font_color": "#03f905",
"font_size": 16,
"align": "center",
"x_offset": 112,
"y_offset": 113,
"x_size": 50,
"y_size": 22
},
{
"enable": true,
"type": "date",
"label": "%b",
"font": "LCD",
"font_color": "#03f905",
"font_size": 16,
"align": "center",
"x_offset": 54,
"y_offset": 113,
"x_size": 48,
"y_size": 22
},
{
"enable": true,
"type": "date",
"label": "%d",
"font": "LCD",
"font_color": "#03f905",
"font_size": 16,
"align": "center",
"x_offset": 8,
"y_offset": 113,
"x_size": 34,
"y_size": 22
},
{
"enable": true,
"type": "battery_percent",
"label": "%d",
"font": "LCD",
"font_color": "#e0a603",
"font_size": 16,
"align": "right",
"x_offset": 168,
"y_offset": 173,
"x_size": 47,
"y_size": 22
},
{
"enable": true,
"type": "battery_voltage",
"label": "%3.1g",
"font": "LCD",
"font_color": "#e0a603",
"font_size": 16,
"align": "right",
"x_offset": 110,
"y_offset": 173,
"x_size": 47,
"y_size": 22
},
{
"enable": true,
"type": "steps",
"label": "%d",
"font": "LCD",
"font_color": "#e0a603",
"font_size": 16,
"align": "right",
"x_offset": 15,
"y_offset": 173,
"x_size": 84,
"y_size": 22
}
]
}
Binary file added watchface_theme_prev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added watchface_theme_prev_120px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added watchface_theme_prev_64px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d92aacb

Please sign in to comment.