-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (64 loc) · 2.6 KB
/
Copy pathci_cd.yml
File metadata and controls
71 lines (64 loc) · 2.6 KB
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
name: GitHub CI
on:
pull_request:
# opened, reopened, and synchronize are default for pull_request
# edited - when PR title or body is changed
# labeled - when labels are added to PR
types: [opened, reopened, synchronize, edited, labeled]
push:
tags:
- "*"
branches:
- main
workflow_dispatch:
env:
DOCUMENTATION_CNAME: 'python-wrapper.scade.docs.pyansys.com'
LIBRARY_NAME: 'ansys-scade-python-wrapper'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
sc:
uses: ansys/scade-actions/.github/workflows/scade-ext-workflow.yml@v3
permissions:
attestations: write # needed for build-wheelhouse and build-library jobs
contents: write # needed for update-changelog, doc-deploy-pr, release, doc-deploy-dev, and doc-deploy-stable jobs
id-token: write # needed for build-wheelhouse and build-library jobs
pull-requests: write # needed for labeler, changelog-fragment, update-changelog, and doc-deploy-pr jobs
with:
# ${{ env.XXX }} not accessible when calling a reusable workflow
documentation-cname: "python-wrapper.scade.docs.pyansys.com"
library-name: "ansys-scade-python-wrapper"
repository-name: "ansys/scade-python-wrapper"
is-public: true
main-python-version: '3.14'
# 3.7 can't be built anymore
build-wheelhouse-versions: "['3.10', '3.12']"
scade-tests-versions: "['23.1', '25.2', '26.1']"
secrets:
PYANSYS_CI_BOT_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
PYANSYS_CI_BOT_USERNAME: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
PYANSYS_CI_BOT_EMAIL: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
PYANSYS_PYPI_PRIVATE_PAT: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
release:
name: "Release project"
runs-on: ubuntu-latest
needs: [sc]
if: ${{ needs.sc.outputs.to-release }}
permissions:
id-token: write # mandatory for trusted publishing with pypa/gh-action-pypi-publish
contents: read
steps:
- name: "Download the library artifacts from build-library step"
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ env.LIBRARY_NAME }}-artifacts
path: ${{ env.LIBRARY_NAME }}-artifacts
- name: "Upload artifacts to PyPI using trusted publisher"
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
repository-url: "https://upload.pypi.org/legacy/"
print-hash: true
packages-dir: ${{ env.LIBRARY_NAME }}-artifacts
skip-existing: false