|
8 | 8 | jobs:
|
9 | 9 | release:
|
10 | 10 | runs-on: ubuntu-latest
|
11 |
| - environment: Secrets |
12 | 11 | concurrency: release
|
| 12 | + environment: Secrets |
13 | 13 | permissions:
|
14 | 14 | id-token: write
|
15 | 15 | contents: write
|
16 | 16 |
|
17 | 17 | steps:
|
18 |
| - - uses: actions/checkout@v4 |
| 18 | + - uses: actions/checkout@v3 |
19 | 19 | with:
|
20 | 20 | fetch-depth: 0
|
21 |
| - tags: true |
22 |
| - |
23 |
| - - name: Set up Python |
24 |
| - uses: actions/setup-python@v5 |
25 |
| - with: |
26 |
| - python-version: 3.x |
27 |
| - |
28 |
| - - name: Install dependencies |
29 |
| - run: | |
30 |
| - python -m pip install --upgrade pip |
31 |
| - pip install build |
32 |
| -
|
33 |
| - - name: Get tag version |
34 |
| - id: get_version |
35 |
| - run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT |
36 |
| - |
37 |
| - - name: Build package |
38 |
| - run: python -m build |
39 |
| - |
40 |
| - - name: Create GitHub Release |
41 |
| - id: create_release |
42 |
| - uses: actions/create-release@v1 |
43 |
| - env: |
44 |
| - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
45 |
| - with: |
46 |
| - tag_name: ${{ steps.get_version.outputs.VERSION }} |
47 |
| - release_name: Release ${{ steps.get_version.outputs.VERSION }} |
48 |
| - body: | |
49 |
| - ## Release ${{ steps.get_version.outputs.VERSION }} |
50 |
| -
|
51 |
| - This is an automated release created from tag ${{ steps.get_version.outputs.VERSION }}. |
52 |
| - draft: false |
53 |
| - prerelease: false |
54 |
| - |
55 |
| - - name: List dist contents |
56 |
| - run: ls -la dist/ |
57 |
| - |
58 |
| - - name: Upload Wheel Distribution |
59 |
| - uses: actions/upload-release-asset@v1 |
60 |
| - env: |
61 |
| - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
62 |
| - with: |
63 |
| - upload_url: ${{ steps.create_release.outputs.upload_url }} |
64 |
| - asset_path: ./dist/martor-${{ steps.get_version.outputs.VERSION }}-py3-none-any.whl |
65 |
| - asset_name: martor-${{ steps.get_version.outputs.VERSION }}-py3-none-any.whl |
66 |
| - asset_content_type: application/octet-stream |
67 | 21 |
|
68 |
| - - name: Upload Source Distribution |
69 |
| - uses: actions/upload-release-asset@v1 |
70 |
| - env: |
71 |
| - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
| 22 | + - name: Python Semantic Release |
| 23 | + uses: python-semantic-release/python-semantic-release@master |
72 | 24 | with:
|
73 |
| - upload_url: ${{ steps.create_release.outputs.upload_url }} |
74 |
| - asset_path: ./dist/martor-${{ steps.get_version.outputs.VERSION }}.tar.gz |
75 |
| - asset_name: martor-${{ steps.get_version.outputs.VERSION }}.tar.gz |
76 |
| - asset_content_type: application/gzip |
| 25 | + github_token: '${{ secrets.GH_TOKEN }}' |
77 | 26 |
|
78 | 27 | upload-to-pypi:
|
79 | 28 | runs-on: ubuntu-latest
|
|
0 commit comments