Skip to content

Commit 3449454

Browse files
Merge pull request #2089 from softlayer/test-pypi
PyPi publishing update
2 parents bea3320 + 607c7c8 commit 3449454

File tree

5 files changed

+40
-31
lines changed

5 files changed

+40
-31
lines changed

Diff for: .github/workflows/codeql-analysis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ jobs:
3939

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@v4
4343

4444
# Initializes the CodeQL tools for scanning.
4545
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v1
46+
uses: github/codeql-action/init@v2
4747
with:
4848
languages: ${{ matrix.language }}
4949
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -54,7 +54,7 @@ jobs:
5454
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5555
# If this step fails, then you should remove it and run the build manually (see below)
5656
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v1
57+
uses: github/codeql-action/autobuild@v2
5858

5959
# ℹ️ Command-line programs to run using the OS shell.
6060
# 📚 https://git.io/JvXDl
@@ -68,4 +68,4 @@ jobs:
6868
# make release
6969

7070
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v1
71+
uses: github/codeql-action/analyze@v2

Diff for: .github/workflows/documentation.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: [3.8]
13+
python-version: [3.11]
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v4
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Install dependencies

Diff for: .github/workflows/release.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
2+
# Trusted Publisher stuff: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
3+
14
name: Release to PyPi
25

36
on:
@@ -8,12 +11,17 @@ jobs:
811
build-n-publish:
912
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
1013
runs-on: ubuntu-latest
14+
environment:
15+
name: pypi
16+
url: https://pypi.org/project/SoftLayer/
17+
permissions:
18+
id-token: write
1119
steps:
12-
- uses: actions/checkout@master
13-
- name: Set up Python 3.8
14-
uses: actions/setup-python@v2
20+
- uses: actions/checkout@v4
21+
- name: Set up Python 3.11
22+
uses: actions/setup-python@v4
1523
with:
16-
python-version: 3.8
24+
python-version: 3.11
1725
- name: Install pypa/build
1826
run: >-
1927
python -m
@@ -28,10 +36,6 @@ jobs:
2836
--wheel
2937
--outdir dist/
3038
.
31-
- name: Publish 📦 to Test PyPI
39+
- name: 📦 to PyPI
3240
uses: pypa/gh-action-pypi-publish@release/v1
33-
with:
34-
user: __token__
35-
password: ${{ secrets.CGALLO_PYPI }}
36-
repository_url: https://upload.pypi.org/legacy/
3741

Diff for: .github/workflows/test_pypi_release.yml

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
2+
# Trusted Publisher stuff: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
23

3-
name: Publish 📦 to TestPyPI
4+
name: TEST Publish 📦 to TestPyPI
45

56
on:
67
push:
7-
branches: [test-pypi ]
8+
branches: [test-pypi]
89

910
jobs:
1011
build-n-publish:
11-
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
12+
name: TEST Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
1213
runs-on: ubuntu-latest
14+
environment:
15+
name: pypi-test
16+
url: https://test.pypi.org/project/SoftLayer/
17+
permissions:
18+
id-token: write
1319
steps:
1420
- uses: actions/checkout@master
15-
- name: Set up Python 3.8
16-
uses: actions/setup-python@v2
21+
- name: Set up Python 3.11
22+
uses: actions/setup-python@v4
1723
with:
18-
python-version: 3.8
24+
python-version: 3.11
1925
- name: Install pypa/build
2026
run: >-
2127
python -m
@@ -31,7 +37,6 @@ jobs:
3137
--outdir dist/
3238
.
3339
- name: Publish 📦 to Test PyPI
34-
uses: pypa/gh-action-pypi-publish@master
40+
uses: pypa/gh-action-pypi-publish@release/v1
3541
with:
36-
password: ${{ secrets.CGALLO_TEST_PYPI }}
37-
repository_url: https://test.pypi.org/legacy/
42+
repository-url: https://test.pypi.org/legacy/

Diff for: .github/workflows/tests.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
python-version: [3.7,3.8,3.9,'3.10',3.11]
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v4
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Install dependencies
@@ -27,9 +27,9 @@ jobs:
2727
coverage:
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v2
30+
- uses: actions/checkout@v4
3131
- name: Set up Python
32-
uses: actions/setup-python@v1
32+
uses: actions/setup-python@v4
3333
with:
3434
python-version: 3.9
3535
- name: Install dependencies
@@ -41,9 +41,9 @@ jobs:
4141
analysis:
4242
runs-on: ubuntu-latest
4343
steps:
44-
- uses: actions/checkout@v2
44+
- uses: actions/checkout@v4
4545
- name: Set up Python
46-
uses: actions/setup-python@v1
46+
uses: actions/setup-python@v4
4747
with:
4848
python-version: 3.9
4949
- name: Install dependencies

0 commit comments

Comments
 (0)