-
Notifications
You must be signed in to change notification settings - Fork 35
52 lines (50 loc) · 1.52 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
name: release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install .[dev]
- name: Build
run: |
python -m build
- name: Get version number
id: get_version
run: echo "VERSION=$(python3 -c "import simphony; print(simphony.__version__)")" >> $GITHUB_ENV
- name: Load Release text
run: |
{
echo 'BODY<<EOF'
python scripts/get_changelog_entry.py ${{ env.VERSION }}
echo EOF
} >> "$GITHUB_ENV"
- name: Publish to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Simphony ${{ env.VERSION }}
body: ${{ env.BODY }}
draft: false
prerelease: false