Debian Codegraph @

.github/workflows/publish.yaml

raw
1 name: Publish
2 on:
3 push:
4 tags: ['*']
5 permissions: {}
6 concurrency:
7 group: publish-${{ github.event.push.ref }}
8 cancel-in-progress: true
9 jobs:
10 build:
11 runs-on: ubuntu-latest
12 outputs:
13 artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}
14 steps:
15 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
16 with:
17 persist-credentials: false
18 - uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
19 with:
20 enable-cache: false
21 prune-cache: false
22 - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
23 with:
24 python-version-file: pyproject.toml
25 - run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
26 - run: uv build
27 - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
28 id: upload-artifact
29 with:
30 name: dist
31 path: dist/
32 if-no-files-found: error
33 create-release:
34 needs: [build]
35 runs-on: ubuntu-latest
36 permissions:
37 contents: write
38 steps:
39 - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
40 with:
41 artifact-ids: ${{ needs.build.outputs.artifact-id }}
42 path: dist/
43 - name: create release
44 run: gh release create --draft --repo ${GITHUB_REPOSITORY} ${GITHUB_REF_NAME} dist/*
45 env:
46 GH_TOKEN: ${{ github.token }}
47 publish-pypi:
48 needs: [build]
49 environment:
50 name: publish
51 url: https://pypi.org/project/Flask-Caching/${{ github.ref_name }}
52 runs-on: ubuntu-latest
53 permissions:
54 id-token: write
55 steps:
56 - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
57 with:
58 artifact-ids: ${{ needs.build.outputs.artifact-id }}
59 path: dist/
60 - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
61 with:
62 packages-dir: "dist/"