-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (55 loc) · 1.74 KB
/
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
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
name: Release
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check-branch:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
group: check-pr-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout Code Repository
uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"dev
environment-file: conda/release.yaml
channels: conda-forge,nodefaults
activate-environment: pydantic-to-django-model-release
auto-update-conda: true
conda-solver: libmamba
- name: Create file with environment variables
run: touch .env
- name: Install dependencies
run: poetry install
- name: Update npm
run: npm -g update npm
- name: Run semantic release (for tests)
if: ${{ github.event_name != 'workflow_dispatch' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: makim release.dry
- name: Release command
if: ${{ github.event_name == 'workflow_dispatch' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
makim release.ci
- name: Generate documentation with changes from semantic-release
run: makim docs.build
- name: GitHub Pages action
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build