Skip to content

Commit

Permalink
add release drafter & release build (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoQuote authored Jun 15, 2020
1 parent fd6e20f commit f217261
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 7 deletions.
30 changes: 30 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name-template: 'v$NEXT_PATCH_VERSION 🌈'
tag-template: 'v$NEXT_PATCH_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
17 changes: 10 additions & 7 deletions .github/workflows/ci.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: ci

on: [push, pull_request]
name: release

on:
release:
types: # This configuration does not affect the page_build event above
- prereleased
- released

jobs:

frontend:
name: Build frontend
runs-on: ubuntu-latest
Expand Down Expand Up @@ -38,8 +40,9 @@ jobs:
name: Build and Push
runs-on: ubuntu-latest
needs: frontend
if: github.ref == 'refs/heads/master'
steps:
- name: set envs
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
- name: Check out code
uses: actions/checkout@v2
- name: Download a Build Artifact
Expand All @@ -53,12 +56,12 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: douz/helpdesk
tags: latest
tags: latest, $RELEASE_VERSION
- uses: docker/build-push-action@v1
with:
path: frontend
dockerfile: frontend/Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: douz/helpdesk-frontend
tags: latest
tags: latest, $RELEASE_VERSION
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: test

on: [push, pull_request]


jobs:

frontend:
name: Build frontend
runs-on: ubuntu-latest
steps:

- uses: actions/setup-node@v1
with:
node-version: '12'

- name: Check out code
uses: actions/checkout@v2

- run: npm install
working-directory: frontend
- run: npm run lint
working-directory: frontend
- run: npm run test:unit
working-directory: frontend

0 comments on commit f217261

Please sign in to comment.