You've already forked AstralRinth
forked from didirus/AstralRinth
Add GitHub actions again
This commit is contained in:
19
.github/workflows/clippy.yml
vendored
19
.github/workflows/clippy.yml
vendored
@@ -0,0 +1,19 @@
|
|||||||
|
name: Code quality
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- run: cargo login ${CRATES_IO_TOKEN}
|
||||||
|
working-directory: ./daedalus
|
||||||
|
env:
|
||||||
|
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
||||||
|
- run: cargo publish
|
||||||
|
working-directory: ./daedalus
|
||||||
|
|||||||
33
.github/workflows/docker.yml
vendored
33
.github/workflows/docker.yml
vendored
@@ -0,0 +1,33 @@
|
|||||||
|
name: docker-build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
-
|
||||||
|
name: Login to GitHub Images
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
-
|
||||||
|
name: Build and push
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ghcr.io/modrinth/daedalus:latest
|
||||||
|
|||||||
30
.github/workflows/publish.yml
vendored
30
.github/workflows/publish.yml
vendored
@@ -0,0 +1,30 @@
|
|||||||
|
name: Publish to crates.io
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
- name: Cache build artifacts
|
||||||
|
id: cache-build
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: target/**
|
||||||
|
key: ${{ runner.os }}-build-cache
|
||||||
|
- name: Annotate commit with clippy warnings
|
||||||
|
uses: actions-rs/clippy-check@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
args: --all-features
|
||||||
|
|||||||
29
.github/workflows/rust.yml
vendored
29
.github/workflows/rust.yml
vendored
@@ -0,0 +1,29 @@
|
|||||||
|
name: Rust building
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Get build cache
|
||||||
|
id: cache-build
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: target/**
|
||||||
|
key: ${{ runner.os }}-build-cache
|
||||||
|
- name: Install toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
env:
|
||||||
|
SQLX_OFFLINE: true
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
name: Build program
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
FROM rust:1.56
|
||||||
|
|
||||||
|
COPY ./ ./
|
||||||
|
|
||||||
|
RUN cargo build --release
|
||||||
|
|
||||||
|
CMD ["./target/release/daedalus_client"]
|
||||||
Reference in New Issue
Block a user