Github actions

master
Didactic Drunk 2021-06-12 17:43:35 -07:00
parent 39fe098f50
commit c00910a6b2
3 changed files with 63 additions and 3 deletions

27
.github/workflows/crystal.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Crystal CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
container:
image: crystallang/crystal
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: shards install
- name: Run tests
run: crystal spec -Dpreview_mt --order random --error-on-warnings
- name: Run bulid
run: shards build -Dpreview_mt
- name: Run format
run: crystal tool format --check

35
.github/workflows/deploy_docs.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Deploy Docs
on:
push:
branches:
- main
tags:
- v*
paths-ignore:
- "CHANGELOG.md"
jobs:
deploy:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- uses: MeilCli/setup-crystal-action@v4.0.1
with:
crystal_version: 1.0.0
shards_version: 0.14.1
- name: Install dependencies
run: shards install
- name: Run crystal doc
run: crystal doc
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3.7.0-8
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs
destination_dir: ${{ steps.extract_branch.outputs.branch }}

View File

@ -2,7 +2,7 @@
[![Crystal CI](https://github.com/didactic-drunk/crypto-secret.cr/actions/workflows/crystal.yml/badge.svg)](https://github.com/didactic-drunk/crypto-secret.cr/actions/workflows/crystal.yml)
[![GitHub release](https://img.shields.io/github/release/didactic-drunk/crypto-secret.cr.svg)](https://github.com/didactic-drunk/crypto-secret.cr/releases)
![GitHub commits since latest release (by date) for a branch](https://img.shields.io/github/commits-since/didactic-drunk/crypto-secret.cr/latest)
[![Docs](https://img.shields.io/badge/docs-available-brightgreen.svg)](https://didactic-drunk.github.io/crypto-secret.cr/master)
[![Docs](https://img.shields.io/badge/docs-available-brightgreen.svg)](https://didactic-drunk.github.io/crypto-secret.cr/main)
Interface intended to hold sensitive information.
@ -60,5 +60,3 @@ end
## Contributors
- [didactic-drunk](https://github.com/didactic-drunk) - current maintainer
[![Docs](https://img.shields.io/badge/docs-available-brightgreen.svg)](https://didactic-drunk.github.io/sodium.cr/master)
# sodium.cr