Skip to content

Commit

Permalink
dependency bump, Change Log, GitHub actions
Browse files Browse the repository at this point in the history
- updated dependencies, increased Rust edition & version
- added this Change Log
- added GitHub actions for dependency updates, linting and release builds
  • Loading branch information
simonrupf committed Dec 25, 2023
1 parent f154c16 commit 868c8af
Show file tree
Hide file tree
Showing 7 changed files with 459 additions and 110 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
day: "saturday"
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Rust test & lint
permissions:
contents: read
checks: write
on:
push:
branches: '*'
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Rust
run: |
rustup toolchain install 1.70.0 --profile minimal --no-self-update --component rustfmt clippy
rustup default 1.70.0
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Execute all unit and integration tests and build examples
run: cargo test
- name: Check formatting of code and suggest improvements
run: cargo fmt -- --check
- name: Check for common mistakes and code improvements
run: cargo clippy --all-targets --all-features -- -D warnings
78 changes: 78 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Release
permissions:
contents: write
on:
push:
tags: '[0-9]+.*'
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}
publish-cargo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
publish-binaries:
strategy:
matrix:
include:
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: universal-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install cross-compilation tools
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
if: startsWith(matrix.os, 'ubuntu')
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: pofo_adr
archive: Atari-Portfolio-address-file-reader-$target
include: CHANGELOG.md,LICENSE.md,README.md
target: ${{ matrix.target }}
token: ${{ secrets.GITHUB_TOKEN }}
publish-packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt-get install -y musl-dev musl-tools
- run: rustup toolchain install 1.70.0
- run: rustup override set 1.70.0
- run: rustup target add --toolchain 1.70.0 x86_64-unknown-linux-musl
- uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-rpm-registry-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-rpm-build-target-${{ hashFiles('**/Cargo.lock') }}
- run: cargo install cargo-deb cargo-generate-rpm
- run: cargo build --release --target x86_64-unknown-linux-musl
- run: cargo deb --target x86_64-unknown-linux-musl
- run: cargo generate-rpm
- uses: Roang-zero1/github-upload-release-artifacts-action@v3
with:
args: "target/generate-rpm/ target/x86_64-unknown-linux-musl/debian/"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Change Log of Atari Portfolio address file reader
=================================================

Version 0.2.0 / 2023-07-01
--------------------------
- updated dependencies, increased Rust edition & version
- added this Change Log
- added GitHub actions for dependency updates, linting and release builds

Version 0.1.0 / 2020-09-20
--------------------------
- initial release, providing read-only functionality
Loading

0 comments on commit 868c8af

Please sign in to comment.