Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added goreleaser for publishing menifest #927

Merged
merged 7 commits into from
Apr 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
yindia marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -41,3 +41,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