Skip to content

Commit

Permalink
chore: switch release workflow to manual, dispatch-based trigger (#298)
Browse files Browse the repository at this point in the history
* chore: workflow_dispatch based chart release

* always run lint jobs
  • Loading branch information
parkedwards authored Feb 9, 2024
1 parent 237e388 commit 516c23f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 23 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/agent-lint-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Lint and Test Prefect Agent Chart

"on":
pull_request_target:
paths:
- .github/workflows/agent-lint-and-test.yaml
- .github/linters/agent-ct.yaml
- charts/prefect-agent/**

# Do not grant jobs any permissions by default
permissions: {}
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: Release Helm Chart

"on":
push:
tags:
# 2023.9.1, but not 2023.09.01
# 2023.11.5, but not 2023.11.05
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
- '2[0-9][2-9][3-9].1?[0-9].[1-3]?[0-9]'
workflow_dispatch:

jobs:
release:
Expand All @@ -17,13 +12,16 @@ jobs:
with:
fetch-depth: 0

# We set the chart release version here - the version schema
# is a SemVer adherent date-based versioning scheme that looks like:
# 2024.1.1-123456
- name: Get the version tags
id: get_version
run: |
# Enable pipefail so git command failures do not result in null versions downstream
set -x
echo "RELEASE_VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT
echo "RELEASE_VERSION=$(date +'%Y.%-m.%-d-%H%M%S')" >> $GITHUB_OUTPUT
echo "PREFECT_VERSION=$(\
git ls-remote --tags --refs --sort="v:refname" \
https://github.com/PrefectHQ/prefect.git '*.*.*' | tail -n1 | sed 's/.*\///' \
Expand Down Expand Up @@ -147,3 +145,14 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}
RELEASE_VERSION: ${{ steps.get_version.outputs.RELEASE_VERSION }}

- name: Create Github Release + Tag
run: |
gh release create $RELEASE_VERSION \
--generate-notes \
--notes "Packaged with Prefect version \
[$PREFECT_VERSION](https://github.com/PrefectHQ/prefect/releases/tag/$PREFECT_VERSION)"
env:
GITHUB_TOKEN: ${{ github.token }}
RELEASE_VERSION: ${{ steps.get_version.outputs.RELEASE_VERSION }}
PREFECT_VERSION: ${{ steps.get_version.outputs.PREFECT_VERSION }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Lint and Test Prometheus Prefect Exporter Chart

"on":
pull_request:
paths:
- .github/workflows/prometheus-prefect-exporter-lint-and-test.yaml
- .github/linters/prometheus-prefect-exporter-ct.yaml
- charts/prometheus-prefect-exporter/**

jobs:
lint_test:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/server-lint-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Lint and Test Prefect Server Chart

"on":
pull_request:
paths:
- .github/workflows/server-lint-and-test.yaml
- .github/linters/server-ct.yaml
- charts/prefect-server/**

# Do not grant jobs any permissions by default
permissions: {}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/worker-lint-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Lint and Test Prefect Worker Chart

"on":
pull_request_target:
paths:
- .github/workflows/worker-lint-and-test.yaml
- .github/linters/worker-ct.yaml
- charts/prefect-worker/**

# Do not grant jobs any permissions by default
permissions: {}
Expand Down

0 comments on commit 516c23f

Please sign in to comment.