diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..47f07be4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,82 @@ +name: Publish + +on: + push: + tags: + - "*.*.*" + +jobs: + release: + name: Publish to Github Releases + outputs: + rc: ${{ steps.check-tag.outputs.rc }} + + strategy: + matrix: + include: + - target: x86_64-unknown-linux-gnu + os: ubuntu-latest + - target: x86_64-pc-windows-msvc + os: windows-latest + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v2 + + - name: Install Rust Toolchain Components + uses: actions-rs/toolchain@v1 + with: + override: true + target: ${{ matrix.target }} + toolchain: stable + profile: minimal + + - name: Install dependencies + shell: bash + run: | + if [[ "$RUNNER_OS" != "Windows" ]]; then + sudo apt install -y libasound2-dev libjack-jackd2-dev + fi + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --target=${{ matrix.target }} + + - name: Build Archive + shell: bash + id: package + env: + target: ${{ matrix.target }} + version: ${{ steps.check-tag.outputs.version }} + run: | + set -euxo pipefail + bin=${GITHUB_REPOSITORY##*/} + src=`pwd` + dist=$src/dist + name=$bin-$version-$target + executable=target/$target/release/$bin + if [[ "$RUNNER_OS" == "Windows" ]]; then + executable=$executable.exe + fi + mkdir $dist + cp $executable $dist + cd $dist + if [[ "$RUNNER_OS" == "Windows" ]]; then + archive=$dist/$name.zip + 7z a $archive * + echo "::set-output name=archive::`pwd -W`/$name.zip" + else + archive=$dist/$name.tar.gz + tar czf $archive * + echo "::set-output name=archive::$archive" + fi + + - name: Publish Archive + uses: softprops/action-gh-release@v1 + with: + files: ${{ steps.package.outputs.archive }} + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/gonk-database/.gitignore b/gonk-database/.gitignore deleted file mode 100644 index 57fb1964..00000000 --- a/gonk-database/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -db -tree \ No newline at end of file diff --git a/gonk-database/Cargo.toml b/gonk-database/Cargo.toml index c077b9db..e7e59919 100644 --- a/gonk-database/Cargo.toml +++ b/gonk-database/Cargo.toml @@ -3,6 +3,12 @@ name = "gonk-database" version = "0.1.0" edition = "2021" +authors = ["Bay"] +description = "Database for gonk" +repository = "https://github.com/zX3no/gonk" +readme = "README.md" +license = "MIT" + [dependencies] memmap2 = "0.5.5" rayon = "1.5.3" diff --git a/gonk-database/README.md b/gonk-database/README.md new file mode 100644 index 00000000..e69de29b