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

[monorepo] Move flytectl gh workflows to monorepo #5354

Merged
merged 5 commits into from
May 15, 2024
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
56 changes: 56 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,59 @@ jobs:
secrets:
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }}
FLYTE_BOT_USERNAME: ${{ secrets.FLYTE_BOT_USERNAME }}

dry_run_goreleaser:
name: Dry Run Goreleaser
runs-on: ubuntu-latest
needs:
- unpack-envvars
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: "0"
- uses: actions/setup-go@v4
with:
go-version: ${{ needs.unpack-envvars.outputs.go-version }}
- name: Run GoReleaser dry run
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser-pro
version: latest
args: --snapshot --skip-publish --rm-dist -f flytectl/.goreleaser.yml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

sandbox:
name: Test Getting started
runs-on: ubuntu-latest
defaults:
run:
working-directory: flytectl
needs:
- unpack-envvars
steps:
- uses: insightsengineering/disk-space-reclaimer@v1
- name: Checkout
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ needs.unpack-envvars.outputs.go-version }}
- name: Build Flytectl binary
run: make compile
- name: Create a sandbox cluster
run: |
bin/flytectl demo start
- name: Setup flytectl config
run: bin/flytectl config init
- name: Register cookbook
run: bin/flytectl register examples -d development -p flytesnacks
- name: Teardown Sandbox cluster
run: bin/flytectl demo teardown
27 changes: 27 additions & 0 deletions .github/workflows/flytectl-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Flytectl release

on:
push:
tags:
- flytectl/v*.*.*

jobs:
release:
name: Goreleaser
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser-pro
args: release --rm-dist -f flytectl/.goreleaser.yml
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }}
2 changes: 2 additions & 0 deletions .github/workflows/flyteidl-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
deploy-to-pypi:
if: "!startsWith(github.event.release.tag_name, 'flytectl/')"
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -28,6 +29,7 @@ jobs:
python -m build
twine upload dist/*
deploy-to-npm:
if: "!startsWith(github.event.release.tag_name, 'flytectl/')"
runs-on: ubuntu-latest
defaults:
run:
Expand Down
6 changes: 6 additions & 0 deletions flytectl/.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
project_name: flytectl

monorepo:
tag_prefix: flytectl/
dir: flytectl

before:
hooks:
- go mod download
Expand Down
Loading