diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 1db5986925..e00c09f2d7 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -28,7 +28,6 @@ jobs: "datacatalog", "flyteadmin", "flytecopilot", - "flyteidl", "flyteplugins", "flytepropeller", "flytestdlib", diff --git a/.github/workflows/flytectl-release.yml b/.github/workflows/flytectl-release.yml index 2bfa6f28eb..2aba67dbe9 100644 --- a/.github/workflows/flytectl-release.yml +++ b/.github/workflows/flytectl-release.yml @@ -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 diff --git a/.github/workflows/flyteidl-release.yml b/.github/workflows/flyteidl-release.yml index 94c13645b2..2b19f7942d 100644 --- a/.github/workflows/flyteidl-release.yml +++ b/.github/workflows/flyteidl-release.yml @@ -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: @@ -29,6 +50,8 @@ jobs: python -m build twine upload dist/* deploy-to-npm: + needs: + - push-flyteidl-tag runs-on: ubuntu-latest defaults: run: diff --git a/flytectl/RELEASE.md b/flytectl/RELEASE.md index 646f7465a6..414aa24199 100644 --- a/flytectl/RELEASE.md +++ b/flytectl/RELEASE.md @@ -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`. diff --git a/flyteidl/RELEASE.md b/flyteidl/RELEASE.md new file mode 100644 index 0000000000..eaaa4d51f6 --- /dev/null +++ b/flyteidl/RELEASE.md @@ -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`. +