Skip to content

Commit

Permalink
Initial actions
Browse files Browse the repository at this point in the history
  • Loading branch information
adesaisma committed May 14, 2021
1 parent 5c67ea9 commit 34115d6
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/kubeflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Build, Publish and Release
name: Kubernetes Batchjob Connector

on:
push:
branches:
- master
tags:
- 'v*'

jobs:

# Create Package
package:

runs-on: ubuntu-latest
name: Package

steps:
- uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x

# Linux package
- name: Publish
run: dotnet publish KubeJobs/KubeJobs.csproj -c Release -o linuxoutput --self-contained -r linux-x64

- name: Tar Linux output folder
run: tar -cvzf ./kubernetes-batchjob-container-linux.tar.gz linuxoutput

- name: Upload Linux artifact
uses: actions/upload-artifact@v2.2.2
with:
name: kubernetes-batchjob-container-artifact
path: ./kubernetes-batchjob-container-linux.tar.gz

# Windows package
- name: Publish
run: dotnet publish KubeJobs/KubeJobs.csproj -c Release -o winoutput --self-contained -r win-x64

- name: action-zip
uses: montudor/action-zip@v0.1.1
with:
args: zip -qq -r ./kubernetes-batchjob-container-win.zip winoutput

- name: Upload Win artifact
uses: actions/upload-artifact@v2.2.2
with:
name: kubernetes-batchjob-container-artifact
path: ./kubernetes-batchjob-container-win.zip

release:

runs-on: ubuntu-latest
name: Release
needs: package

steps:
- name: Download Package
uses: actions/download-artifact@v1
with:
name: kubernetes-batchjob-container-artifact
path: ./

- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

0 comments on commit 34115d6

Please sign in to comment.