Initial implementation

This commit is contained in:
Taiki Endo
2021-12-30 17:33:20 +09:00
parent 2268dc2bb7
commit 0a6b5bf893
14 changed files with 792 additions and 0 deletions

62
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,62 @@
name: CI
permissions:
contents: read
on:
pull_request:
push:
branches:
- main
- dev
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-18.04
tool:
- cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog,cross,shellcheck,shfmt
- cargo-hack@0.5.9,cargo-llvm-cov@0.1.13,cargo-minimal-versions@0.1.0,parse-changelog@0.4.5,cross@0.2.1,shellcheck@0.8.0,shfmt@3.4.2
include:
- os: macos-10.15
tool: cargo-hack@0.5.9,cargo-llvm-cov@0.1.13,cargo-minimal-versions@0.1.0,parse-changelog@0.4.5,cross@0.2.1,shellcheck@0.8.0,shfmt@3.4.2
- os: windows-2019
tool: cargo-hack,cargo-llvm-cov,cargo-minimal-versions,parse-changelog
- os: windows-2019
tool: cargo-hack@0.5.9,cargo-llvm-cov@0.1.13,cargo-minimal-versions@0.1.0,parse-changelog@0.4.5,cross@0.2.1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: ./
with:
tool: ${{ matrix.tool }}
tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: taiki-e/github-actions/install@main
with:
tool: prettier,shellcheck,shfmt
- run: shfmt -d $(git ls-files '*.sh')
if: always()
- run: npx prettier -c $(git ls-files '*.yml')
if: always()
- run: npx prettier -c $(git ls-files '*.js')
if: always()
- run: shellcheck $(git ls-files '*.sh')
if: always()

30
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Release
permissions:
# TODO: once `releases: write` is supported, use it instead.
contents: write
on:
push:
tags:
- v[0-9]+.[0-9]+.*
defaults:
run:
shell: bash
jobs:
create-release:
if: github.repository_owner == 'taiki-e'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: CHANGELOG.md
title: $version
branch: 'main|v[0-9]+'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}