Skip to content

Commit

Permalink
Added goreleaser for publishing menifest (#927)
Browse files Browse the repository at this point in the history
* added goreleaser for publishing menifest

Signed-off-by: yuvraj <[email protected]>

* Rename release file name

Signed-off-by: yuvraj <[email protected]>

* Added script for artifacts

Signed-off-by: yuvraj <[email protected]>

* More changes

Signed-off-by: yuvraj <[email protected]>

* More changes

Signed-off-by: yuvraj <[email protected]>

* fix typo

Signed-off-by: yuvraj <[email protected]>

* minor changes

Signed-off-by: yuvraj <[email protected]>
Signed-off-by: Haytham Abuelfutuh <[email protected]>
  • Loading branch information
yindia authored and EngHabu committed May 1, 2021
1 parent 7525a31 commit 673e300
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish-menifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Create a flyte release
on:
workflow_dispatch:
inputs:
version:
description: 'version name. example v0.1.1'
required: true

jobs:
goreleaser:
name: Goreleaser
runs-on: ubuntu-latest
outputs:
version: ${{ steps.bump-version.outputs.tag }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Bump version and push tag
id: bump-version
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }}
WITH_V: true
CUSTOM_TAG: ${{ github.event.inputs.version }}
RELEASE_BRANCHES: master
- uses: actions/checkout@v2
with:
fetch-depth: "0"
ref: ${{ github.event.inputs.version }}
- name: build Release Menifest
run: |
make prepare_artifacts
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ docs/_sources/
docs/flytekit/flytekit.interfaces.html
docs/searchindex.js
docs/
release/
__pycache__/
14 changes: 14 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
project_name: flyte
builds:
- skip: true
release:
github:
owner: flyteorg
name: flyte
draft: false
prerelease: auto
discussion_category_name: General
name_template: "{{.ProjectName}}-v{{.Version}}"
disable: false
extra_files:
- glob: ./release/*
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ stats:
@generate-dashboard -o deployment/stats/prometheus/flytepropeller-dashboard.json stats/flytepropeller_dashboard.py
@generate-dashboard -o deployment/stats/prometheus/flyteadmin-dashboard.json stats/flyteadmin_dashboard.py
@generate-dashboard -o deployment/stats/prometheus/flyteuser-dashboard.json stats/flyteuser_dashboard.py

.PHONY: prepare_artifacts
prepare_artifacts:
bash script/prepare_artifacts.sh
11 changes: 11 additions & 0 deletions script/prepare_artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -ex

for file in ./deployment/**/flyte_generated.yaml; do
if [ -f "$file" ]; then
result=${file/#"./deployment/"}
result=${result/%"/flyte_generated.yaml"}
cp $file "./release/flyte_${result}_manifest.yaml"
fi
done

0 comments on commit 673e300

Please sign in to comment.