1
- name : Upload Release Package to PyPI
1
+ name : Release to PyPI
2
2
3
3
on :
4
4
release :
5
5
types : [released]
6
+ pull-request :
6
7
7
8
jobs :
8
9
deploy :
9
10
runs-on : ubuntu-latest
11
+ environment : release
12
+ permissions :
13
+ # IMPORTANT: this permission is mandatory for trusted publishing
14
+ id-token : write
10
15
steps :
11
16
- name : Check out Pulser
12
17
uses : actions/checkout@v3
24
29
shell : bash
25
30
run : ./.github/scripts/package.sh
26
31
- name : Publish to TestPyPI
27
- env :
28
- TWINE_USERNAME : ${{ secrets.TESTPYPI_USERNAME }}
29
- TWINE_PASSWORD : ${{ secrets.TESTPYPI_PASSWORD }}
30
32
run : twine upload --repository testpypi dist/*
31
33
- name : Install from TestPyPI
32
34
timeout-minutes : 5
@@ -43,54 +45,54 @@ jobs:
43
45
run : |
44
46
grep -e pytest dev_requirements.txt | sed 's/ //g' | xargs pip install
45
47
pytest
46
- - name : Publish to PyPI
47
- env :
48
- TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
49
- TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
50
- run : twine upload dist/*
51
- - name : Confirm deployment
52
- timeout-minutes : 5
53
- shell : bash
54
- run : |
55
- version="$(head -1 VERSION.txt)"
56
- until pip download pulser==$version
57
- do
58
- echo "Failed to download from PyPI, will wait for upload and retry."
59
- sleep 30
60
- done
48
+ # - name: Publish to PyPI
49
+ # env:
50
+ # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
51
+ # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
52
+ # run: twine upload dist/*
53
+ # - name: Confirm deployment
54
+ # timeout-minutes: 5
55
+ # shell: bash
56
+ # run: |
57
+ # version="$(head -1 VERSION.txt)"
58
+ # until pip download pulser==$version
59
+ # do
60
+ # echo "Failed to download from PyPI, will wait for upload and retry."
61
+ # sleep 30
62
+ # done
61
63
62
- check-release :
63
- needs : deploy
64
- runs-on : ${{ matrix.os }}
65
- strategy :
66
- fail-fast : false
67
- matrix :
68
- os : [ubuntu-latest, macos-latest, windows-latest]
69
- python-version : ["3.8", "3.9", "3.10", "3.11"]
70
- steps :
71
- - name : Check out Pulser
72
- uses : actions/checkout@v3
73
- with :
74
- ref : ${{ github.ref }}
75
- - name : Set up Python
76
- uses : actions/setup-python@v4
77
- with :
78
- python-version : ${{ matrix.python-version }}
79
- - name : Install Pulser from PyPI
80
- timeout-minutes : 5
81
- shell : bash
82
- run : |
83
- python -m pip install --upgrade pip
84
- version="$(head -1 VERSION.txt)"
85
- until pip install pulser==$version
86
- do
87
- echo "Failed to install from PyPI, will wait for upload and retry."
88
- sleep 30
89
- done
90
- - name : Test the installation
91
- shell : bash
92
- run : |
93
- version="$(head -1 VERSION.txt)"
94
- python -c "import pulser; assert pulser.__version__ == '$version'"
95
- grep -e pytest dev_requirements.txt | sed 's/ //g' | xargs pip install
96
- pytest
64
+ # check-release:
65
+ # needs: deploy
66
+ # runs-on: ${{ matrix.os }}
67
+ # strategy:
68
+ # fail-fast: false
69
+ # matrix:
70
+ # os: [ubuntu-latest, macos-latest, windows-latest]
71
+ # python-version: ["3.8", "3.9", "3.10", "3.11"]
72
+ # steps:
73
+ # - name: Check out Pulser
74
+ # uses: actions/checkout@v3
75
+ # with:
76
+ # ref: ${{ github.ref }}
77
+ # - name: Set up Python
78
+ # uses: actions/setup-python@v4
79
+ # with:
80
+ # python-version: ${{ matrix.python-version }}
81
+ # - name: Install Pulser from PyPI
82
+ # timeout-minutes: 5
83
+ # shell: bash
84
+ # run: |
85
+ # python -m pip install --upgrade pip
86
+ # version="$(head -1 VERSION.txt)"
87
+ # until pip install pulser==$version
88
+ # do
89
+ # echo "Failed to install from PyPI, will wait for upload and retry."
90
+ # sleep 30
91
+ # done
92
+ # - name: Test the installation
93
+ # shell: bash
94
+ # run: |
95
+ # version="$(head -1 VERSION.txt)"
96
+ # python -c "import pulser; assert pulser.__version__ == '$version'"
97
+ # grep -e pytest dev_requirements.txt | sed 's/ //g' | xargs pip install
98
+ # pytest
0 commit comments