Skip to content

Commit

Permalink
v1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriansaliou committed Jul 7, 2022
1 parent d348a6f commit 6ab40ce
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 6 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
on:
push:
tags:
- "v*.*.*"

name: Build and Release

jobs:
build-releases:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache build artifacts
id: cache-cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/bin
~/.cargo/registry
~/.cargo/git
target
key: build-${{ runner.os }}-cargo-any

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-01-07
components: rustfmt
override: true

- name: Install cross-compilation tools (if needed)
run: which cross >/dev/null || cargo install cross

- name: Verify versions
run: rustc --version && rustup --version && cargo --version && cross --version

- name: Get current tag
id: current_tag
uses: WyriHaximus/github-action-get-previous-tag@v1

- name: Release binaries
run: ./scripts/release_binaries.sh --version=${{ steps.current_tag.outputs.tag }}

- name: Release new version
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.current_tag.outputs.tag }}
name: Raider ${{ steps.current_tag.outputs.tag }}
body: "⚠️ Changelog not yet provided."
files: ./${{ steps.current_tag.outputs.tag }}-*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-docker:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Acquire Docker image metadata
id: metadata
uses: docker/metadata-action@v4
with:
images: valeriansaliou/raider

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
push: true
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.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "raider-server"
version = "1.2.1"
version = "1.2.2"
description = "Affiliates dashboard. Used by affiliates to generate tracking codes and review their balance."
readme = "README.md"
license = "MPL-2.0"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Raider
======

[![Test and Build](https://github.com/valeriansaliou/raider/workflows/Test%20and%20Build/badge.svg?branch=master)](https://github.com/valeriansaliou/raider/actions?query=workflow%3A%22Test+and+Build%22) [![dependency status](https://deps.rs/repo/github/valeriansaliou/raider/status.svg)](https://deps.rs/repo/github/valeriansaliou/raider) [![Buy Me A Coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://www.buymeacoffee.com/valeriansaliou)
[![Test and Build](https://github.com/valeriansaliou/raider/workflows/Test%20and%20Build/badge.svg?branch=master)](https://github.com/valeriansaliou/raider/actions?query=workflow%3A%22Test+and+Build%22) [![Build and Release](https://github.com/valeriansaliou/raider/workflows/Build%20and%20Release/badge.svg)](https://github.com/valeriansaliou/raider/actions?query=workflow%3A%22Build+and+Release%22) [![dependency status](https://deps.rs/repo/github/valeriansaliou/raider/status.svg)](https://deps.rs/repo/github/valeriansaliou/raider) [![Buy Me A Coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://www.buymeacoffee.com/valeriansaliou)

**Affiliates dashboard. Used by affiliates to generate tracking codes and review their balance.**

Expand Down Expand Up @@ -84,13 +84,13 @@ You might find it convenient to run Raider via Docker. You can find the pre-buil
First, pull the `valeriansaliou/raider` image:

```bash
docker pull valeriansaliou/raider:v1.2.1
docker pull valeriansaliou/raider:v1.2.2
```

Then, seed it a configuration file and run it (replace `/path/to/your/raider/config.cfg` with the path to your configuration file):

```bash
docker run -p 8080:8080 -v /path/to/your/raider/config.cfg:/etc/raider.cfg valeriansaliou/raider:v1.2.1
docker run -p 8080:8080 -v /path/to/your/raider/config.cfg:/etc/raider.cfg valeriansaliou/raider:v1.2.2
```

In the configuration file, ensure that:
Expand Down
2 changes: 1 addition & 1 deletion scripts/release_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function release_for_architecture {
mkdir ./raider && \
cp -p "target/$2/release/raider" ./raider/ && \
cp -r ./config.cfg ./res raider/ && \
tar -czvf "$final_tar" ./raider && \
tar --owner=0 --group=0 -czvf "$final_tar" ./raider && \
rm -r ./raider/
release_result=$?

Expand Down

0 comments on commit 6ab40ce

Please sign in to comment.