Merge branch 'github-actions-to-gitlab-cicd' into 'master'
feat: github actions -> gitlab CI/CD See merge request xory/mrfetch!1
This commit is contained in:
commit
31a9d270b6
2 changed files with 24 additions and 35 deletions
35
.github/workflows/rust.yml
vendored
35
.github/workflows/rust.yml
vendored
|
@ -1,35 +0,0 @@
|
|||
name: Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build release
|
||||
run: cargo build --release --verbose
|
||||
|
||||
- name: Automatic Releases
|
||||
uses: marvinpinto/action-automatic-releases@v1.2.1
|
||||
with:
|
||||
# GitHub secret token
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Release title (for automatic releases)
|
||||
title: Automatic release
|
||||
# Assets to upload to the release
|
||||
files: target/release/mrfetch
|
||||
# Git tag
|
||||
automatic_release_tag: AUTO
|
||||
# Prerelease
|
||||
prerelease: true
|
||||
|
24
.gitlab-ci.yml
Normal file
24
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Official language image. Look for the different tagged releases at:
|
||||
# https://hub.docker.com/r/library/rust/tags/
|
||||
image: "rust:latest"
|
||||
|
||||
# Optional: Pick zero or more services to be used on all builds.
|
||||
# Only needed when using a docker container to run your tests in.
|
||||
# Check out: https://docs.gitlab.com/ee/ci/services/index.html
|
||||
# services:
|
||||
# - mysql:latest
|
||||
# - redis:latest
|
||||
# - postgres:latest
|
||||
|
||||
# Optional: Install a C compiler, cmake and git into the container.
|
||||
before_script:
|
||||
- sudo apt-get update -yqq
|
||||
- sudo apt-get upgrade -yqq
|
||||
- sudo apt-get install -yqq --no-install-recommends build-essential
|
||||
- sudo apt-get install -yqq --no-install-recommends gcc
|
||||
- curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||
|
||||
build:cargo:
|
||||
script:
|
||||
- rustc --version && cargo --version
|
||||
- cargo build
|
Loading…
Reference in a new issue