-
Notifications
You must be signed in to change notification settings - Fork 21
40 lines (34 loc) · 1.2 KB
/
client_releases.yml
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
name: Client Release on Version Change
on:
push:
paths:
- 'client/pyproject.toml'
branches:
- main
jobs:
release-client:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get client version number
id: get_client_version
run: |
CLIENT_VERSION=$(grep '^version =' client/pyproject.toml | sed 's/version = "//g' | sed 's/"//g')
echo "CLIENT_VERSION=$CLIENT_VERSION" > $GITHUB_ENV
- name: Create Git tag for client
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git tag "astra-assistants-client-${{ env.CLIENT_VERSION }}"
git push origin "astra-assistants-client-${{ env.CLIENT_VERSION }}"
- name: Create GitHub Release for client
uses: actions/create-release@v1
with:
tag_name: "client-${{ env.CLIENT_VERSION }}"
release_name: "v${{ env.CLIENT_VERSION }} (client)"
body: "Automated release for client version v${{ env.CLIENT_VERSION }}"
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}