Skip to content

Commit

Permalink
Release version 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sorairolake committed Aug 18, 2022
2 parents 62dac50 + f76176d commit 648eac2
Show file tree
Hide file tree
Showing 39 changed files with 2,950 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "image"
- dependency-name: "qrcode"
- dependency-name: "rqrr"
91 changes: 91 additions & 0 deletions .github/workflows/CD.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: CD

on:
push:
branches:
- develop
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-20.04
use-cross: true
- target: x86_64-apple-darwin
os: macos-11
- target: x86_64-pc-windows-msvc
os: windows-2022
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: actions-rs/[email protected]
with:
toolchain: 1.61.0 # MSRV
target: ${{ matrix.target }}
override: true
profile: minimal
- name: Cache build artifacts
uses: Swatinem/[email protected]
with:
key: ${{ matrix.target }}
- name: Build a package
uses: actions-rs/[email protected]
with:
command: build
args: --release --target ${{ matrix.target }}
use-cross: ${{ matrix.use-cross }}
- name: Get version
id: get_version
uses: battila7/[email protected]
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- name: Install Asciidoctor
run: |
gem install asciidoctor
asciidoctor -V
- name: Build man pages
run: |
mkdir -p build
asciidoctor -b manpage -a "revnumber=${{ steps.get_version.outputs.version-without-v }}" -D build doc/man/man1/*.adoc
- name: Create a package
shell: bash
run: |
if [ "${{ matrix.os }}" != "windows-2022" ] ; then
bin="target/${{ matrix.target }}/release/qrtool"
else
bin="target/${{ matrix.target }}/release/qrtool.exe"
fi
package="qrtool-${{ steps.get_version.outputs.version }}-${{ matrix.target }}"
mkdir -p "${package}"/{doc,man}
cp README.md COPYRIGHT LICENSE-APACHE LICENSE-MIT "${bin}" "${package}"
cp {AUTHORS,BUILD,CHANGELOG,CONTRIBUTING}.adoc "${package}"/doc
cp build/* "${package}"/man
if [ "${{ matrix.os }}" != "windows-2022" ] ; then
tar czvf "${package}.tar.gz" "${package}"
else
7z a -bb "${package}.zip" "${package}"
fi
- name: Release
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: 'qrtool-*'
name: "Release version ${{ steps.get_version.outputs.version-without-v }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101 changes: 101 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: CI

on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
schedule:
- cron: '0 0 * * *'

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target: x86_64-unknown-linux-musl
os: ubuntu-20.04
use-cross: true
- target: x86_64-apple-darwin
os: macos-11
- target: x86_64-pc-windows-msvc
os: windows-2022
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: actions-rs/[email protected]
with:
toolchain: 1.61.0 # MSRV
target: ${{ matrix.target }}
override: true
profile: minimal
- name: Cache build artifacts
uses: Swatinem/[email protected]
with:
key: ${{ matrix.target }}
- name: Build a package
uses: actions-rs/[email protected]
with:
command: build
args: --target ${{ matrix.target }}
use-cross: ${{ matrix.use-cross }}
- name: Run tests
uses: actions-rs/[email protected]
with:
command: test
args: --target ${{ matrix.target }}
use-cross: ${{ matrix.use-cross }}

rustfmt:
name: Rustfmt
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: actions-rs/[email protected]
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- name: Cache build artifacts
uses: Swatinem/[email protected]
- name: Check code formatted
uses: actions-rs/[email protected]
with:
command: fmt
args: -- --check

clippy:
name: Clippy
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: actions-rs/[email protected]
with:
toolchain: stable
override: true
profile: minimal
components: clippy
- name: Cache build artifacts
uses: Swatinem/[email protected]
- name: Check no lint warnings
uses: actions-rs/[email protected]
with:
command: clippy
args: -- -D warnings
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# These are backup files generated by rustfmt
**/*.rs.bk
5 changes: 5 additions & 0 deletions AUTHORS.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
= List of Authors

== Original author

* https://github.com/sorairolake[Shun Sakai]
24 changes: 24 additions & 0 deletions BUILD.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
= Build

== Prerequisites

.To build *qrtool*, you will need the following dependencies
* https://doc.rust-lang.org/stable/cargo/[Cargo] (v1.61.0 or later)

.To build man pages, you will need the following additional dependencies
* https://asciidoctor.org/[Asciidoctor]

== Building from source

.To clone the repository
[source, shell]
----
git clone https://github.com/sorairolake/qrtool.git
cd qrtool
----

.To build a package
[source, shell]
----
just build
----
19 changes: 19 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
= Changelog
:toc: macro
:project-url: https://github.com/sorairolake/qrtool
:compare-url: {project-url}/compare
:issue-url: {project-url}/issues
:pull-request-url: {project-url}/pull

All notable changes to this project will be documented in this file.

The format is based on https://keepachangelog.com/[Keep a Changelog], and this
project adheres to https://semver.org/[Semantic Versioning].

toc::[]

== {project-url}/releases/tag/v0.1.0[0.1.0] - 2022-08-18

=== Added

* Initial release
38 changes: 38 additions & 0 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
= Contribution Guide
:git-flow-url: https://nvie.com/posts/a-successful-git-branching-model/
:commit-messages-guide-url: https://github.com/RomuloOliveira/commit-messages-guide

== Branching model

The branching model of this project is based on the {git-flow-url}[git-flow].

== Style guides

=== Commit message

Please see the {commit-messages-guide-url}[Commit messages guide].

== Development

=== Useful development tools

The https://github.com/casey/just[just] command runner can be used.
Run `just --list` for more details.

.Run tests
[source, shell]
----
just test
----

.Run the formatter
[source, shell]
----
just fmt
----

.Run the linter
[source, shell]
----
just lint
----
6 changes: 6 additions & 0 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/sorairolake/qrtool

Files: *
Copyright: 2022 Shun Sakai
License: Apache-2.0 or MIT
Loading

0 comments on commit 648eac2

Please sign in to comment.