-
Notifications
You must be signed in to change notification settings - Fork 73
57 lines (55 loc) · 1.93 KB
/
release.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Release
on:
push:
branches: [main, test]
tags: ['*']
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies and set up venv
run: |
sudo apt-get update
sudo apt-get install -y ninja-build libcunit1-dev
python -m venv venv
source venv/bin/activate
pip install meson
- name: Build tarball and changelogs
run: |
source venv/bin/activate
git rm -rf c/tests/meson-subproject
git config --global user.email "CI@CI.com"
git config --global user.name "Mr Robot"
git add -A
git commit -m "dummy commit to make meson not add in the symlinked directory"
meson c build-gcc
meson dist -C build-gcc
python docs/convert_changelog.py c/CHANGELOG.rst > C-CHANGELOG.txt
python docs/convert_changelog.py python/CHANGELOG.rst > PYTHON-CHANGELOG.txt
- name: Get the version
id: get_version
run:
echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: C Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && contains(github.event.ref, 'C_')
with:
name: C API ${{ steps.get_version.outputs.VERSION }}
body_path: C-CHANGELOG.txt
draft: True
fail_on_unmatched_files: True
files: build-gcc/meson-dist/*
- name: Python Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && !contains(github.event.ref, 'C_')
with:
name: Python ${{ steps.get_version.outputs.VERSION }}
body_path: PYTHON-CHANGELOG.txt
draft: True
fail_on_unmatched_files: True