Skip to content
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
89 changes: 89 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Release Pipeline

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
upload_url: ${{ steps.release.outputs.upload_url }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
# Token for creating PRs and releases
token: ${{ secrets.GITHUB_TOKEN }}

build-package:
name: Build Python Package
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install build dependencies
run: python -m pip install build

- name: Build sdist and wheel
run: python -m build

- name: Store distribution packages
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: dist/

publish-github-release:
name: Attach to GitHub Release
needs: [release-please, build-package]
runs-on: ubuntu-latest
permissions:
contents: write # Needed to upload release assets
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Download distribution packages
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist/

- name: Attach artifacts to GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ needs.release-please.outputs.tag_name }} dist/*

publish-pypi:
name: Publish to PyPI
needs: [release-please, build-package]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write # Needed for trusted publishing to PyPI
steps:
- name: Download distribution packages
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist/

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0"
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

All notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

This file is maintained automatically by
[release-please](https://github.com/googleapis/release-please) based on
[Conventional Commits](https://www.conventionalcommits.org/).
62 changes: 62 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"release-type": "python",
"package-name": "datavault4sqlglot",
"include-component-in-tag": false,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"changelog-sections": [
{
"type": "feat",
"section": "Features",
"hidden": false
},
{
"type": "fix",
"section": "Bug Fixes",
"hidden": false
},
{
"type": "docs",
"section": "Documentation",
"hidden": false
},
{
"type": "style",
"section": "Code Style",
"hidden": false
},
{
"type": "refactor",
"section": "Refactoring",
"hidden": false
},
{
"type": "perf",
"section": "Performance",
"hidden": false
},
{
"type": "test",
"section": "Tests",
"hidden": false
},
{
"type": "build",
"section": "Build System",
"hidden": false
},
{
"type": "ci",
"section": "CI/CD",
"hidden": false
},
{
"type": "chore",
"section": "Miscellaneous",
"hidden": false
}
],
"packages": {
".": {}
}
}
Loading