-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (60 loc) · 1.91 KB
/
release.yaml
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
name: Generate Next Release
# This workflow will generate changelog and release notes.
on:
workflow_dispatch:
env:
DIST_DIR: dist
jobs:
release:
name: Create next release
runs-on: ubuntu-latest
outputs:
new_release_published: ${{ steps.release.outputs.new_release_published }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Create GitHub release
id: release
uses: cycjimmy/semantic-release-action@v4
with:
extra_plugins: |
@semantic-release/[email protected]
@semantic-release/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: equinix-labs@auto-commit-workflow
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: equinix-labs@auto-commit-workflow
GIT_COMMITTER_EMAIL: [email protected]
RELEASE_REQUESTER: "@${{ github.event.sender.login }}"
publish:
name: Publish artifacts
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.new_release_published == 'true'
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version-file: .python-version
- name: Install dependencies
run: |
python -m pip install --upgrade build
- name: Build package
run: |
python -m build --sdist --wheel --outdir ${{ env.DIST_DIR }} .
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ${{ env.DIST_DIR }}