Skip to content

Commit

Permalink
Turn flyteidl and flytectl releases into manual gh workflows (flyteor…
Browse files Browse the repository at this point in the history
…g#5635)

* Make flyteidl releases go through a manual gh workflow

Signed-off-by: Eduardo Apolinario <[email protected]>

* Make flytectl releases go through a manual gh workflow

Signed-off-by: Eduardo Apolinario <[email protected]>

* Rewrite the documentation for `version` and clarify wording in RELEASE.md

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Bugra Gedik <[email protected]>
  • Loading branch information
2 people authored and bgedik committed Aug 15, 2024
1 parent 0514430 commit 80c349d
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
"datacatalog",
"flyteadmin",
"flytecopilot",
"flyteidl",
"flyteplugins",
"flytepropeller",
"flytestdlib",
Expand Down
27 changes: 24 additions & 3 deletions .github/workflows/flytectl-release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
name: Flytectl release

on:
push:
tags:
- flytectl/v*.*.*
workflow_dispatch:
inputs:
version:
description: "version. Do *not* use the `flytectl/` prefix, e.g. `flytectl/v1.2.3`, instead use only `v1.2.3` (including the `v`)"
required: true

jobs:
push-flytectl-tag:
name: Push git tag containing the `flyteidl/` prefix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.FLYTE_BOT_PAT }}
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/flytectl/${{ github.event.inputs.version }}`,
sha: context.sha
})
release:
name: Goreleaser
needs:
- push-flytectl-tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
31 changes: 27 additions & 4 deletions .github/workflows/flyteidl-release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
name: Upload flyteidl to PyPI and npm
name: Release flyteidl

on:
push:
tags:
- flyteidl/v*.*.*
workflow_dispatch:
inputs:
version:
description: "version. Do *not* use the `flyteidl/` prefix, e.g. `flyteidl/v1.2.3`, instead use only `v1.2.3` (including the `v`)"
required: true

jobs:
push-flyteidl-tag:
name: Push git tag containing the `flyteidl/` prefix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.FLYTE_BOT_PAT }}
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/flyteidl/${{ github.event.inputs.version }}`,
sha: context.sha
})
deploy-to-pypi:
needs:
- push-flyteidl-tag
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -29,6 +50,8 @@ jobs:
python -m build
twine upload dist/*
deploy-to-npm:
needs:
- push-flyteidl-tag
runs-on: ubuntu-latest
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion flytectl/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Flytectl releases map to git tags with the prefix `flytectl/` followed by a semver string, e.g. [flytectl/v0.9.0](https://github.com/flyteorg/flyte/releases/tag/flytectl%2Fv0.9.0).

To release a new version of flytectl push a new git tag in the format described above. This will kick off a <[github workflow](https://github.com/flyteorg/flyte/blob/master/.github/workflows/flytectl-release.yml) responsible for releasing this new version. Note how the git tag has to be formatted a certain way for the workflow to run.
To release a new version of flytectl run the <[github workflow](https://github.com/flyteorg/flyte/blob/master/.github/workflows/flytectl-release.yml), which is responsible for releasing this new version. Remember to use valid semver versions, including adding the prefix `v`, e.g. `v1.2.3`.
4 changes: 4 additions & 0 deletions flyteidl/RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Release Process

To release a new version of flyteidl run the <[github workflow](https://github.com/flyteorg/flyte/blob/master/.github/workflows/flyteidl-release.yml), which is responsible for releasing this new version. Remember to use valid semver versions, including adding the prefix `v`, e.g. `v1.2.3`.

0 comments on commit 80c349d

Please sign in to comment.