-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.37 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
name: Release new version
on:
push:
branches:
- readme
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: true
matrix:
python-version:
- 3.8
- 3.9
steps:
- uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }} Environment
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/coverage.txt
- name: Coverage Test
run: |
coverage run runtests.py
coverage report
- name: Set env
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "STRIP_RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Build
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python setup.py sdist bdist_wheel
cp dist/django-dysession-${{ env.STRIP_RELEASE_VERSION }}.tar.gz dist/django-dysession.tar.gz
- name: Archive wheel artifacts file
uses: actions/upload-artifact@v3
with:
name: django-dysession-${{ env.RELEASE_VERSION }}-artifacts
path: |
dist/*