Adds first CI config draft to build the binary

Fixes copy paste error


Fixes artifact upload


Removes unused files from artifact


Adds release step
This commit is contained in:
Maximilian Kratz 2022-09-27 13:56:05 +02:00
parent c07df08269
commit 18e5242be2

43
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,43 @@
name: Build CoreDNS utils
on:
push:
# Run pipeline for commits on branch 'master' and on 'testing/<stuff>'
branches:
- master
- 'testing/**'
- 'feature/**'
- 'hotfix/**'
# Run pipeline for release tags
tags:
- 'v*.*.*'
jobs:
# Build
build:
runs-on: [ubuntu-20.04]
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Run make
run: |
make
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: coredns-keygen
path: coredns-keygen/coredns-keygen
# Create a release if running on tag
create-release:
needs: [build]
runs-on: [ubuntu-20.04]
# Only run on pushed tags (and explicitely ignore scheduled runs)
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && github.event_name != 'schedule'
steps:
- name: Collect artifacts
uses: actions/download-artifact@master
- name: Release CoreDNS utils
uses: softprops/action-gh-release@v1
with:
files: |
coredns-keygen/coredns-keygen