-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (64 loc) · 1.6 KB
/
cd.yml
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
name: CD
on:
schedule:
- cron: "0 0 * * 3"
workflow_dispatch:
env:
TASK_X_REMOTE_TASKFILES: 1
jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yml
secrets: inherit
release:
name: Release
needs: [ci]
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
id: ${{ steps.release.outputs.id }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump
uses: commitizen-tools/[email protected]
with:
changelog_increment_filename: _changelog.md
github_token: ${{ github.token }}
no_raise: 3,21
- name: Download artifacts
if: env.PREVIOUS_REVISION != env.REVISION
uses: actions/download-artifact@v4
with:
name: sopsy-dist
path: ./dist/
- name: Release
id: release
if: env.PREVIOUS_REVISION != env.REVISION
uses: softprops/action-gh-release@v2
with:
body_path: _changelog.md
files: ./dist/*
tag_name: ${{ env.REVISION }}
publish:
name: Publish
needs: [release]
if: needs.release.outputs.id != ''
runs-on: ubuntu-latest
permissions:
id-token: write
environment: release
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: sopsy-dist
path: ./dist/
- name: Publish package to PyPI
if: env.PREVIOUS_REVISION != env.REVISION
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true