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

temporarily remove github/docker steps from release.yml #1446

Closed
wants to merge 5 commits into from
Closed
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
38 changes: 5 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ jobs:
name: "Release prep: generate changelog, bump version"
uses: ./.github/workflows/release_prep_hatch.yml
with:
branch: ${{ inputs.branch }}
version: ${{ inputs.version }}
deploy-to: ${{ inputs.deploy-to }}
branch: ${{ inputs.target_branch }}
version: ${{ inputs.version_number }}
deploy-to: "prod"
secrets: inherit

build-release:
Expand All @@ -145,7 +145,7 @@ jobs:
- uses: pypa/hatch@install
- id: archive
run: |
archive_name=${{ github.event.repository.name }}-${{ inputs.version }}-${{ inputs.deploy-to }}
archive_name=${{ github.event.repository.name }}-${{ inputs.version_number }}-${{ inputs.deploy-to }}
echo "name=$archive_name" >> $GITHUB_OUTPUT
- run: hatch build && hatch run build:check-all
- uses: actions/upload-artifact@v4
Expand All @@ -154,25 +154,13 @@ jobs:
path: dist/
retention-days: 3

github-release:
name: GitHub Release
if: ${{ !failure() && !cancelled() && !inputs.only_docker }}
needs: [build-release, release-prep]
uses: dbt-labs/dbt-adapters/.github/workflows/github-release.yml@main
with:
sha: ${{ needs.bump-version-generate-changelog.outputs.final_sha }}
version_number: ${{ inputs.version_number }}
changelog_path: ${{ needs.bump-version-generate-changelog.outputs.changelog_path }}
test_run: ${{ inputs.test_run }}
archive_name: ${{ needs.build-release.outputs.archive-name }}

pypi-release:
name: PyPI Release
if: ${{ !failure() && !cancelled() && !inputs.only_docker }}
needs: build-release
runs-on: ubuntu-latest
environment:
name: ${{ inputs.deploy-to }}
name: "prod"
url: ${{ vars.PYPI_PROJECT_URL }}
permissions:
# this permission is required for trusted publishing
Expand All @@ -184,28 +172,12 @@ jobs:
repository-url: ${{ vars.PYPI_REPOSITORY_URL }}
archive-name: ${{ needs.build-release.outputs.archive-name }}

docker-release:
name: "Docker Release"
# We cannot release to docker on a test run because it uses the tag in GitHub as
# what we need to release but draft releases don't actually tag the commit so it
# finds nothing to release
if: ${{ !failure() && !cancelled() && (!inputs.test_run || inputs.only_docker) }}
needs: github-release
permissions:
packages: write
uses: dbt-labs/dbt-release/.github/workflows/release-docker.yml@main
with:
version_number: ${{ inputs.version_number }}
test_run: ${{ inputs.test_run }}

slack-notification:
name: Slack Notification
if: ${{ failure() && (!inputs.test_run || inputs.nightly_release) }}
needs:
[
github-release,
pypi-release,
docker-release,
]
uses: dbt-labs/dbt-release/.github/workflows/slack-post-notification.yml@main
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release_prep_hatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ jobs:

- uses: pypa/hatch@install

- name: "Add Homebrew To PATH"
run: |
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH

- name: "Install `changie`"
run: |
brew tap miniscruff/changie https://github.com/miniscruff/changie
Expand Down
Loading