-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (57 loc) · 1.99 KB
/
release.yaml
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
55
56
57
58
59
60
61
62
63
64
65
66
name: release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
type: string
jobs:
release:
name: release
runs-on: ubuntu-latest
env:
VERSION: ${{ inputs.version }}
GH_TOKEN: ${{ secrets.PAT }}
steps:
- name: checkout branch to be released
uses: actions/checkout@v4
with:
# Release from the main branch
ref: main
fetch-depth: 0
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: setup git config
run: |
git config --global user.email "devops-github-rudderstack@users.noreply.github.com"
git config --global user.name "devops-github-rudderstack"
- name: set version and create tag
run: |
VERSION=$VERSION make version
git add . && git commit -m "chore: release ${VERSION}"
git tag -a ${VERSION} -m "release ${VERSION}"
- name: install dependencies
run: pip3 install wheel setuptools
- name: build wheel
working-directory: src/predictions
run: python setup.py bdist_wheel
- name: prepare dist archives
shell: bash
run: |
mkdir -p dist
tar -czvf dist/profiles_mlcorelib_dist_${VERSION}.tar.gz -C src/predictions dist
- name: bump version PR
run: |
git checkout -b release-${VERSION}
git push origin release-${VERSION}
gh pr create --title "chore: bump version to ${{ env.VERSION }}" \
--body "This PR updates the version file with the latest release version" \
--base main --head release-${VERSION} \
--assignee "${{ github.actor }}"
- name: push tag and create release
run: |
git push origin tag ${VERSION}
gh release create ${VERSION} --generate-notes dist/*.tar.gz src/predictions/dist/*.whl