mirror of
https://github.com/lov3b/ecb-rates.git
synced 2025-06-28 07:50:23 +02:00
Add package yaml
This commit is contained in:
51
.github/workflows/package.yml
vendored
Normal file
51
.github/workflows/package.yml
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
name: Build Packages
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*" # Triggers on tags starting with 'v'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write # Needed for creating releases
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- name: Install packaging tools
|
||||||
|
run: |
|
||||||
|
cargo install cargo-deb
|
||||||
|
cargo install cargo-generate-rpm
|
||||||
|
|
||||||
|
- name: Build Debian package
|
||||||
|
run: cargo deb
|
||||||
|
|
||||||
|
- id: get_tag_info
|
||||||
|
name: Get Tag Info
|
||||||
|
run: |
|
||||||
|
tag="${GITHUB_REF##*/}"
|
||||||
|
echo "Found tag: $tag"
|
||||||
|
message=$(git tag -l --format='%(contents)' "$tag")
|
||||||
|
# Set outputs using the recommended environment files approach
|
||||||
|
echo "tag=$tag" >> $GITHUB_OUTPUT
|
||||||
|
echo "message=$message" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Create GitHub Release
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
tag: ${{ steps.get_tag_info.outputs.tag }}
|
||||||
|
name: Release ${{ steps.get_tag_info.outputs.tag }}
|
||||||
|
body: ${{ steps.get_tag_info.outputs.message }}
|
||||||
|
artifacts: |
|
||||||
|
target/debian/*.deb
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
allowUpdates: true
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -252,7 +252,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ecb-rates"
|
name = "ecb-rates"
|
||||||
version = "0.1.0"
|
version = "1.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ecb-rates"
|
name = "ecb-rates"
|
||||||
description = "Query exchange rates from the European Central Bank (ECB)"
|
description = "Query exchange rates from the European Central Bank (ECB)"
|
||||||
version = "0.1.0"
|
version = "1.0.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Love Billenius <lovebillenius@disroot.org>"]
|
authors = ["Love Billenius <lovebillenius@disroot.org>"]
|
||||||
license-file = "LICENSE"
|
license-file = "LICENSE"
|
||||||
|
12
README.md
12
README.md
@ -7,7 +7,7 @@
|
|||||||
alt="European Central Bank Logo"
|
alt="European Central Bank Logo"
|
||||||
align="left"
|
align="left"
|
||||||
/>
|
/>
|
||||||
A CLI utility to fetch the currency rates against the Euro from the ECB.
|
A CLI utility to fetch exchange reates from the European Central Bank.
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
@ -63,23 +63,23 @@ It wouldn't be a rust project without being *BLAZINGLY FAST*! When the cache is
|
|||||||
|
|
||||||
#### Show the original data from ECB
|
#### Show the original data from ECB
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### ...with only select currencies
|
#### ...with only select currencies
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### Put the exchange rate in the perspective of any currency
|
#### Put the exchange rate in the perspective of any currency
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### Flip it
|
#### Flip it
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### Show multiple days
|
#### Show multiple days
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Acknowledgment
|
## Acknowledgment
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user