Skip to content

Commit

Permalink
Merge 6ac9a20 into 05a13bc
Browse files Browse the repository at this point in the history
  • Loading branch information
nogic1008 committed Feb 25, 2021
2 parents 05a13bc + 6ac9a20 commit 32d8166
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 40 deletions.
44 changes: 9 additions & 35 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
name: 'CI/CD'
name: Node.js CI

on:
push:
branches:
- master
paths:
- '**'
- '!**.md'
tags:
- 'v*'
paths-ignore:
- '**.md'
pull_request:
paths:
- '**'
- '!**.md'
paths-ignore:
- '**.md'

jobs:
build:
name: Build & Test
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
# Setup Environment
- uses: actions/checkout@v2
Expand All @@ -39,13 +35,14 @@ jobs:
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn --frozen-lockfile
run: yarn --frozen-lockfile --ignore-scripts

- name: Lint
run: yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test
run: yarn test --ci
- name: Report Code Coverage to codecov
uses: codecov/codecov-action@v1
- name: GitHub Actions Build Test
Expand All @@ -64,26 +61,3 @@ jobs:
env:
STEPS_CONTEXT: ${{ toJson(steps.act.outputs) }}
run: echo $STEPS_CONTEXT
- name: Drafts next Release notes
if: (!contains(github.ref, 'tags/v'))
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
name: Release
needs: [build]
if: contains(github.ref, 'tags/v')
runs-on: ubuntu-latest
steps:
- name: Get Version
id: get_tag
run: echo ::set-output name=version::${TAG_REF_NAME##*/}
env:
TAG_REF_NAME: ${{ github.ref }}
- name: Release for GitHub Actions
uses: technote-space/release-github-actions@v7.0.1
with:
BRANCH_NAME: releases/${MAJOR}
CLEAN_TARGETS: .[!.]*,__tests__,coverage,lib,node_modules,src,*.js,*.ts,*.json,*.lock,_config.yml
COMMIT_MESSAGE: 'build: release ${{ steps.get_tag.outputs.version }} via ${{ github.sha }}'
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release

on:
release:
types: [published]

jobs:
release:
name: Release
runs-on: ubuntu-20.04
steps:
- name: Release for GitHub Actions
uses: technote-space/release-github-actions@v7.0.1
with:
BRANCH_NAME: releases/${MAJOR}
BUILD_COMMAND: yarn install --frozen-lockfile --ignore-scripts && yarn build
CLEAN_TARGETS: .[!.]*,__tests__,coverage,lib,node_modules,src,*.js,*.ts,*.json,*.lock,_config.yml
COMMIT_MESSAGE: 'build: release ${{ github.event.release.tag_name }} via ${{ github.sha }}'
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,3 @@ Thumbs.db
# Ignore built files
lib/
dist/

# husky shell files
.husky/_
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
2 changes: 1 addition & 1 deletion README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![last commit](https://img.shields.io/github/last-commit/ddradar/choose-random-action "last commit")](https://github.com/ddradar/choose-random-action/commits/master)
[![release version](https://img.shields.io/github/v/release/ddradar/choose-random-action?sort=semver "release version")](https://github.com/ddradar/choose-random-action/releases)
[![CI/CD](https://github.com/ddradar/choose-random-action/workflows/CI/CD/badge.svg)](https://github.com/ddradar/choose-random-action/actions?query=workflow%3ACI%2FCD)
[![Node.js CI](https://github.com/ddradar/choose-random-action/actions/workflows/node.yml/badge.svg)](https://github.com/ddradar/choose-random-action/actions/workflows/node.yml)
[![codecov](https://codecov.io/gh/ddradar/choose-random-action/branch/master/graph/badge.svg)](https://codecov.io/gh/ddradar/choose-random-action)
[![CodeFactor](https://www.codefactor.io/repository/github/ddradar/choose-random-action/badge)](https://www.codefactor.io/repository/github/ddradar/choose-random-action)
[![License](https://img.shields.io/github/license/ddradar/choose-random-action)](LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![last commit](https://img.shields.io/github/last-commit/ddradar/choose-random-action "last commit")](https://github.com/ddradar/choose-random-action/commits/master)
[![release version](https://img.shields.io/github/v/release/ddradar/choose-random-action?sort=semver "release version")](https://github.com/ddradar/choose-random-action/releases)
[![CI/CD](https://github.com/ddradar/choose-random-action/workflows/CI/CD/badge.svg)](https://github.com/ddradar/choose-random-action/actions?query=workflow%3ACI%2FCD)
[![Node.js CI](https://github.com/ddradar/choose-random-action/actions/workflows/node.yml/badge.svg)](https://github.com/ddradar/choose-random-action/actions/workflows/node.yml)
[![codecov](https://codecov.io/gh/ddradar/choose-random-action/branch/master/graph/badge.svg)](https://codecov.io/gh/ddradar/choose-random-action)
[![CodeFactor](https://www.codefactor.io/repository/github/ddradar/choose-random-action/badge)](https://www.codefactor.io/repository/github/ddradar/choose-random-action)
[![License](https://img.shields.io/github/license/ddradar/choose-random-action)](LICENSE)
Expand Down

0 comments on commit 32d8166

Please sign in to comment.