Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
vladkens committed Jun 16, 2024
0 parents commit b4a3d88
Show file tree
Hide file tree
Showing 14 changed files with 1,949 additions and 0 deletions.
Binary file added .github/macmon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: check

on:
push:
branches:
- '**'

jobs:
check:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- run: rustup update --no-self-update stable && rustup default stable
- run: cargo fmt --check
- run: cargo build --release --locked
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: release

on:
push:
tags: 'v*'

permissions:
contents: write

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- run: rustup update --no-self-update stable && rustup default stable
- run: cargo fmt --check
- run: cargo build --release --locked
- name: archiving
id: archive
run: |
strip target/release/macmon
cp target/release/macmon macmon
tar czf macmon-${{ github.ref_name }}.tar.gz readme.md LICENSE macmon
ls -lah | grep macmon
- uses: softprops/action-gh-release@v2
with:
files: macmon-${{ github.ref_name }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: mislav/bump-homebrew-formula-action@v3
with:
homebrew-tap: vladkens/homebrew-apps
formula-name: macmon
formula-path: macmon.rb
commit-message: "{{formulaName}} {{version}}"
download-url: https://github.com/vladkens/macmon/releases/download/${{ github.ref_name }}/macmon-${{ github.ref_name }}.tar.gz
env:
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
/target
5 changes: 5 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=
edition = "2021"
max_width = 100
use_small_heuristics = "Max"
tab_spaces = 2
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true,
},
"terminal.integrated.tabStopWidth": 2,
"editor.formatOnSave": true,
"code-runner.executorMap": {
"rust": "cargo run -r #$fileName",
},
"files.exclude": { "Cargo.lock": true },
}
Loading

0 comments on commit b4a3d88

Please sign in to comment.