-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (61 loc) · 1.87 KB
/
deploy.yml
File metadata and controls
74 lines (61 loc) · 1.87 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Deploy
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python 3
run: uv python install 3.12
- name: Install the latest version of rye
uses: eifinger/setup-rye@v4
- name: Install dependencies
run: rye sync
- name: Install dependencies
run: rye install git-cliff --force
- name: Determine next version
id: get_version
run: |
NEW_VERSION=$(rye run git-cliff --bumped-version)
echo "QLIENT_NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
- name: Generate a changelog
uses: orhun/git-cliff-action@v4
id: git-cliff
with:
config: cliff.toml
args: --verbose --tag="${{ env.QLIENT_NEW_VERSION }}" --unreleased
env:
OUTPUT: CHANGELOG.md
- name: Build package
run: rye build --all --clean
- name: Create and push the new tag
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git tag v${{ env.QLIENT_NEW_VERSION }}
git push origin v${{ env.QLIENT_NEW_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.QLIENT_NEW_VERSION }}
name: ${{ env.QLIENT_NEW_VERSION }}
draft: true
prerelease: true
body_path: CHANGELOG.md
files: |
dist/*
generate_release_notes: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}