Skip to content

Commit b4c1cbe

Browse files
committed
1 parent 7056edf commit b4c1cbe

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ charset = utf-8
55
indent_style = space
66
indent_size = 4
77
insert_final_newline = true
8+
9+
[*.yml]
10+
indent_size = 2

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publish to TestPyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v0.[0-9]+.dev[0-9]+'
7+
8+
permissions: {}
9+
10+
jobs:
11+
build:
12+
name: Build package distributions
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
steps:
17+
- uses: actions/checkout@v5
18+
with:
19+
persist-credentials: false
20+
- name: Set up Python
21+
uses: actions/setup-python@v6
22+
with:
23+
python-version: '3.x'
24+
- name: Install pypa/build
25+
run: python3 -m pip install build --user
26+
- name: Build a binary wheel and a source tarball
27+
run: python3 -m build
28+
- name: Store the package distributions
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: python-package-distributions
32+
path: dist/
33+
34+
publish-to-testpypi:
35+
name: Publish to TestPyPI
36+
runs-on: ubuntu-latest
37+
needs:
38+
- build
39+
environment:
40+
name: testpypi
41+
url: https://test.pypi.org/p/kaitaistruct
42+
permissions:
43+
# IMPORTANT: mandatory for trusted publishing - see
44+
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
45+
id-token: write
46+
steps:
47+
- name: Download all the dists
48+
uses: actions/download-artifact@v5
49+
with:
50+
name: python-package-distributions
51+
path: dist/
52+
- name: Publish distribution to TestPyPI
53+
uses: pypa/gh-action-pypi-publish@release/v1
54+
with:
55+
repository-url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)