-
Notifications
You must be signed in to change notification settings - Fork 3
79 lines (66 loc) · 2.27 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
69
70
71
72
73
74
75
76
77
78
79
name: "Semantic Release"
on:
workflow_dispatch:
inputs:
DRY_RUN:
required: false
default: false
permissions:
contents: write
pages: write
id-token: write
jobs:
SEMANTIC_RELEASE:
runs-on: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v3
- name: "Semantic Release"
id: semantic-release
uses: "piotrlaczkowski/keras-data-processor/.github/templates/github/semantic_release@main"
with:
PROJECT_NAME: KDP
PROJECT_DIRECTORY: .
BRANCHES: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRY_RUN: ${{ inputs.DRY_RUN }}
- name: "testing TAG fetch"
shell: bash
run: |
echo "CURRENT TAG:"
echo ${{ steps.semantic-release.outputs.new_release_version }}
echo "CURRENT Notes:"
echo ${{ steps.semantic-release.outputs.new_release_notes }}
- name: Set up Python
if: steps.semantic-release.outcome == 'success'
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install Python dependencies
shell: bash
run: |
# updating python
python -m pip install --upgrade pip
# installing poetry
pip install poetry
# disable venvs
poetry config virtualenvs.create false
# assuring we have all extras for testing as well
poetry install --all-extras --no-interaction
- name: Publishing to PyPI
shell: bash
run: |
# Configuring PyPi
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
# Setting correct package version
poetry version ${{ steps.semantic-release.outputs.new_release_version }}
# Publishing to PyPi
poetry publish --build
- name: "Releasing new documentation with mike"
continue-on-error: true
shell: bash
run: |
echo "CURRENT TAG:"
echo "${{ steps.semantic-release.outputs.new_release_version }}"
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
mike deploy --push --update-aliases ${{ steps.semantic-release.outputs.new_release_version }} latest