34 lines
731 B
YAML
34 lines
731 B
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
create:
|
|
tags: [ '*' ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container: kmkfw/base
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Test the code (lint)
|
|
run: make test
|
|
- name: Package the code
|
|
run: make dist
|
|
|
|
- name: Write the s3cfg secret
|
|
run: echo "${secrets.S3CFG}" > .s3cfg
|
|
|
|
- name: Branch based code deployment
|
|
run: make dist-deploy
|
|
if: github.event_name == 'push'
|
|
env:
|
|
CIRCLE_BRANCH: "${GITHUB_REF_NAME}"
|
|
- name: Tag based code deployment
|
|
run: make dist-deploy
|
|
if: github.event_name == 'create'
|
|
env:
|
|
CIRCLE_TAG: "${GITHUB_REF_NAME}"
|