-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (35 loc) · 1.17 KB
/
continous-integration-workflow.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
40
41
42
43
name: Build
on: push
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function
- name: Install Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Upgrade python packaging tools
run: python -m pip install --upgrade pip setuptools wheel
- name: Install poetry
run: pip install poetry
- name: Install dependencies
run: poetry install
- name: Set SPEC_VERSION env var
run: echo ::set-env name=SPEC_VERSION::$(poetry run python scripts/calculate_version.py)
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Create release (master only)
id: create-release
if: github.ref == 'refs/heads/master'
uses: actions/create-release@v1
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.SPEC_VERSION }}
release_name: ${{ env.SPEC_VERSION }}