-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (33 loc) · 982 Bytes
/
release.yaml
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
name: Release
on:
release:
types: [published]
jobs:
checks:
name: Version check
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.10.5
# Install poetry
- name: Load cached Poetry installation
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-0
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Check version
run: |
echo "project_name=${{ github.event.repository.name }}" >> $GITHUB_ENV;
echo "project_version=`poetry version`" >> $GITHUB_ENV;
echo "tag_name=${{ github.ref_name }}" >> $GITHUB_ENV;
[ "$project_version" == "$project_name $tag_name" ];