File: release.yml

package info (click to toggle)
python-maggma 0.72.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,388 kB
  • sloc: python: 9,610; makefile: 12
file content (76 lines) | stat: -rw-r--r-- 1,749 bytes parent folder | download | duplicates (2)
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
name: release

on:
  release:
    types: [published]

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4

    - uses: actions/setup-python@v5
      with:
        python-version: "3.10"

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools setuptools_scm wheel build

    - name: Build packages
      run: |
        python -m build --sdist --wheel

    - name: Publish package
      uses: pypa/gh-action-pypi-publish@master
      with:
        user: __token__
        password: ${{ secrets.PYPY_API_TOKEN }}

  docs:
    runs-on: ubuntu-latest
    needs:
    - deploy

    steps:
    - uses: actions/checkout@v4

    - uses: actions/setup-python@v5
      with:
        python-version: "3.10"

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements/ubuntu-latest_py3.10_extras.txt
        pip install -e .

    - name: Generate changelog
      uses: charmixer/auto-changelog-action@v1
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        exclude_labels: dependencies

    - name: Commit files
      run: |
        git config --local user.email "feedback@materialsproject.org"
        git config --local user.name "materialsproject"
        mv CHANGELOG.md docs/
        git add docs/CHANGELOG.md && git commit -m 'Updated CHANGELOG.md'

    - name: Push changes
      uses: ad-m/github-push-action@master
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}

    - name: Build
      run: mkdocs build

    - name: Deploy
      uses: peaceiris/actions-gh-pages@v4.0.0
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: ./site