Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 62 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,65 @@
name: release

on:
push:
branches: [master]
pull_request:
branches: [master]
# TODO: setup release to pypi
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mp-cite
permissions:
id-token: write

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: 3.12

- name: Build
run: uv-build

- name: Publish
run: uv-publish --trusted-publishing always

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

steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: 3.12

- name: Install deps
run: uv sync --locked --all-extras --dev

- 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"
git stash
git pull origin main
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 }}
# integrate mkdocs at some point
2 changes: 0 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v6
Expand Down
Empty file added docs/CHANGELOG.md
Empty file.