Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: release

on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"

jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
outputs:
release_version: ${{ steps.set_version.outputs.version }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set Release Version
id: set_version
run: echo "::set-output name=version::$(date +'%Y.%m.%d.%H%M%S')"

- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create ${{ steps.set_version.outputs.version }}

build-release:
name: Build and Release Binary
needs: ['create-release']
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Build Release Binary
run: cargo build --release

- name: Create Release Archive
run: |
cp target/release/oi oi
tar czf oi.tar.gz oi
working-directory: ${{ github.workspace }}

- name: Upload Release Archive
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.create-release.outputs.release_version }} oi.tar.gz --clobber
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

shell completion scripts
add a proper release with binaries
license?
improve docs
user customisable colours (using an environment variable)
general code improvements (and probable bug fixes)
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
[package]
name = "oi"
version = "0.2.0"
authors = ["David Sherriff <d.sherriff.81@gmail.com>"]
version = "0.2.1"
authors = ["Vysakh Premkumar <vysakhpr218@gmail.com>"]
edition = "2021"
description = "trivia on the command line."
license = "GPL-3.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[[bin]]
name = "oi"
path = "src/main.rs"


[dependencies]
anyhow = "~1.0"
chrono = "~0.4"
Expand All @@ -16,3 +22,4 @@ glob = "~0.3"
scraper = "~0.12"
ureq = { version = "~2.4", features = ["charset"] }
whoami = "~1.2"

Loading