-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (71 loc) · 2.25 KB
/
cd.yaml
File metadata and controls
87 lines (71 loc) · 2.25 KB
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
80
81
82
83
84
85
86
87
name: Continuous Deployment
on:
push:
branches: [main]
workflow_dispatch:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
cd:
name: CD
if: github.repository == 'famura/neuralfields'
runs-on: ubuntu-latest
permissions: # https://docs.github.com/en/actions/security-guides/automatic-token-authentication
contents: write # to publish the docs to gh-pages
env:
os: ubuntu-latest
python: "3.10"
steps:
- name: Install prerequisites
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install --yes curl gcc git
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set up poetry
run: |
curl -sSL https://install.python-poetry.org | python3 - --force
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure git
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Install dependencies
run: poetry install
- name: Bump patch version
run: poetry run poe bump-version-tag patch
- name: Deploy docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry run poe test
poetry run poe docs
poetry run poe deploy-docs --push --alias latest
- name: Deploy package
run: |
poetry run poe deploy-package --username ${{ secrets.PYPI_USER }} --password ${{ secrets.PYPI_TOKEN }}
- name: Push version tag
run: poetry run poe push-latest-version-tag
release_draft:
name: Update release notes
runs-on: ubuntu-latest
permissions: # https://docs.github.com/en/actions/security-guides/automatic-token-authentication
contents: write
steps:
- uses: release-drafter/release-drafter@v5.22.0
with:
config-name: release_drafter.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}