-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create the tag and release workflow
- Loading branch information
Showing
4 changed files
with
99 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
name: Quality | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
quality: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup NodeJS | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '10.23.0' | ||
|
||
- name: Check node_modules cache | ||
uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install JS dependencies if not cached | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: yarn | ||
|
||
- name: Run quality checks | ||
run: | | ||
yarn test | ||
yarn tsc | ||
yarn lint | ||
- name: Run DangerJS | ||
env: | ||
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} | ||
run: yarn danger ci | ||
# name: Quality | ||
|
||
# on: | ||
# pull_request: | ||
# branches: | ||
# - develop | ||
|
||
# jobs: | ||
# quality: | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Checkout repo | ||
# uses: actions/checkout@v2 | ||
|
||
# - name: Setup NodeJS | ||
# uses: actions/setup-node@v2 | ||
# with: | ||
# node-version: '10.23.0' | ||
|
||
# - name: Check node_modules cache | ||
# uses: actions/cache@v2 | ||
# id: yarn-cache | ||
# with: | ||
# path: node_modules | ||
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-yarn- | ||
|
||
# - name: Install JS dependencies if not cached | ||
# if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
# run: yarn | ||
|
||
# - name: Run quality checks | ||
# run: | | ||
# yarn test | ||
# yarn tsc | ||
# yarn lint | ||
|
||
# - name: Run DangerJS | ||
# env: | ||
# DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} | ||
# run: yarn danger ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Create a release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Tag | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
|
||
jobs: | ||
tag: | ||
if: ${{ github.event.label.name == 'deployed' }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Git credentials | ||
run: | | ||
git config user.email "$(git log --format='%ae' HEAD^!)" | ||
git config user.name "$(git log --format='%an' HEAD^!)" | ||
- name: Setup NodeJS | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '10.23.0' | ||
|
||
- name: Update the app version and tag it | ||
run: npx standard-version | ||
|
||
- name: Commit the changes | ||
run: git push --follow-tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters