forked from databricks/databricks-sdk-py
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.3 KB
/
release.yml
File metadata and controls
54 lines (43 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Release
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on:
group: databricks-deco-testing-runner-group
labels: ubuntu-latest-deco
environment: release
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.13
- name: Install build
run: pip install build
- name: Build wheel
run: python -m build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Write release notes to file
run: |
RELEASE_NOTES_DIR=/tmp/release-notes
mkdir -p "$RELEASE_NOTES_DIR"
RELEASE_NOTES_FILE="$RELEASE_NOTES_DIR/release-notes.md"
git for-each-ref --format='%(body)' ${{ github.ref }} > "$RELEASE_NOTES_FILE"
echo "Release notes file: $RELEASE_NOTES_FILE"
echo "Release notes contents:"
cat "$RELEASE_NOTES_FILE"
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: /tmp/release-notes/release-notes.md
files: |
dist/databricks_*.whl
dist/databricks_*.tar.gz
- uses: pypa/gh-action-pypi-publish@release/v1
name: Publish package distributions to PyPI