forked from AntoineCollin/scMusketeers
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (62 loc) · 1.77 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
58
59
60
61
62
63
64
65
66
67
68
name: Release Python Package
permissions:
id-token: write
contents: write
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'release-*' # Push events to matching v*, i.e. v1.0, v20.15.10
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
release:
name: Create Release
strategy:
fail-fast: false
matrix:
python-version: [ "3.10" ]
poetry-version: [ "1.8.1" ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
# by default, it uses a depth of 1
# this fetches all history so that we can read each commit
fetch-depth: 0
- name: Generate Changelog
run: .github/release_message.sh > release_message.md
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: release_message.md
deploy:
name: Build and Publish
needs: release
strategy:
fail-fast: false
matrix:
python-version: [ "3.10" ]
poetry-version: [ "1.8.1" ]
poetry-version-pip: [ "==1.8.1" ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Python Poetry Action
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install project
run: make install
- name: Build project
run: poetry build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_SCMUSK_TOKEN }}