diff --git a/.github/workflows/publish-menifest.yml b/.github/workflows/publish-menifest.yml new file mode 100644 index 0000000000..834e3f51d6 --- /dev/null +++ b/.github/workflows/publish-menifest.yml @@ -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/github-tag-action@1.17.2 + 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 }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index bdde967a1d..bd8ac5ca2c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ docs/_sources/ docs/flytekit/flytekit.interfaces.html docs/searchindex.js docs/ +release/ __pycache__/ diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000000..a69fd22b81 --- /dev/null +++ b/.goreleaser.yml @@ -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/* \ No newline at end of file diff --git a/Makefile b/Makefile index 19cb24ee95..481ded60e5 100644 --- a/Makefile +++ b/Makefile @@ -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 \ No newline at end of file diff --git a/script/prepare_artifacts.sh b/script/prepare_artifacts.sh new file mode 100644 index 0000000000..e2d60e7f8d --- /dev/null +++ b/script/prepare_artifacts.sh @@ -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