Skip to content

Commit 3e9cdc4

Browse files
committed
Upload artifacts in separate job
1 parent 90d32a8 commit 3e9cdc4

File tree

2 files changed

+61
-56
lines changed

2 files changed

+61
-56
lines changed

.github/workflows/github-release.yml

Lines changed: 60 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,64 @@ on:
99

1010
jobs:
1111
release:
12+
name: Create Github Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Download Python Build Artifacts
16+
uses: actions/download-artifact@v4
17+
with:
18+
name: Source Tarball
19+
path: dist
20+
21+
- name: Download Python Build Artifacts
22+
uses: actions/download-artifact@v4
23+
with:
24+
name: Python Wheel
25+
path: dist
26+
27+
- name: Download Artifacts
28+
uses: actions/download-artifact@v4
29+
with:
30+
name: ${{ matrix.python }}-${{ matrix.arch }}-${{ matrix.platform }}.tar.xz
31+
path: release-artifacts/
32+
33+
- name: Create Release
34+
id: create_release
35+
uses: actions/create-release@v1
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
38+
with:
39+
tag_name: "v${{ inputs.version }}"
40+
release_name: "Release v${{ inputs.version }}"
41+
body: |
42+
Release ${{ needs.build-python-package.outputs.version }}
43+
draft: false
44+
prerelease: false
45+
46+
- name: Upload Source Tarball
47+
id: upload-release-asset-source
48+
uses: actions/upload-release-asset@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
53+
asset_path: dist/relenv-${{ inputs.version }}.tar.gz
54+
asset_name: relenv-${{ inputs.version }}.tar.gz
55+
asset_content_type: application/tar+gzip
56+
57+
- name: Upload Wheel
58+
id: upload-release-asset-x86_64
59+
uses: actions/upload-release-asset@v1
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
64+
asset_path: dist/relenv-${{ inputs.version }}-py3-none-any.whl
65+
asset_name: relenv-${{ inputs.version }}-py3-none-any.whl
66+
asset_content_type: application/zip
67+
68+
69+
upload-artifacts:
1270
name: Create Github Release
1371
runs-on: ubuntu-latest
1472
strategy:
@@ -88,65 +146,12 @@ jobs:
88146
- platform: macos
89147
arch: arm64
90148
python: 3.13.0
91-
92149
steps:
93-
- name: Download Python Build Artifacts
94-
uses: actions/download-artifact@v4
95-
with:
96-
name: Source Tarball
97-
path: dist
98-
99-
- name: Download Python Build Artifacts
100-
uses: actions/download-artifact@v4
101-
with:
102-
name: Python Wheel
103-
path: dist
104-
105-
- name: Download Artifacts
106-
uses: actions/download-artifact@v4
107-
with:
108-
name: ${{ matrix.python }}-${{ matrix.arch }}-${{ matrix.platform }}.tar.xz
109-
path: release-artifacts/
110-
111-
- name: Create Release
112-
id: create_release
113-
uses: actions/create-release@v1
114-
env:
115-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
116-
with:
117-
tag_name: "v${{ inputs.version }}"
118-
release_name: "Release v${{ inputs.version }}"
119-
body: |
120-
Release ${{ needs.build-python-package.outputs.version }}
121-
draft: false
122-
prerelease: false
123-
124-
- name: Upload Source Tarball
125-
id: upload-release-asset-source
126-
uses: actions/upload-release-asset@v1
127-
env:
128-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
129-
with:
130-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
131-
asset_path: dist/relenv-${{ inputs.version }}.tar.gz
132-
asset_name: relenv-${{ inputs.version }}.tar.gz
133-
asset_content_type: application/tar+gzip
134-
135-
- name: Upload Wheel
136-
id: upload-release-asset-x86_64
137-
uses: actions/upload-release-asset@v1
138-
env:
139-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140-
with:
141-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
142-
asset_path: dist/relenv-${{ inputs.version }}-py3-none-any.whl
143-
asset_name: relenv-${{ inputs.version }}-py3-none-any.whl
144-
asset_content_type: application/zip
145-
146-
- name: Upload Release artifacts
150+
- name: Upload ${{ matrix.python }}-${{ matrix.arch }}-${{ matrix.platform }}.tar.xz
147151
id: upload-python-build-assets
148152
uses: actions/upload-release-asset@v1
149153
with:
154+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
150155
name: ${{ matrix.python }}-${{ matrix.arch }}-${{ matrix.platform }}.tar.xz
151156
path: release-artifacts/
152157
asset_content_type: application/tar+xz

relenv/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import time
1919

2020
# relenv package version
21-
__version__ = "0.17.40000000"
21+
__version__ = "0.17.400000"
2222

2323
MODULE_DIR = pathlib.Path(__file__).resolve().parent
2424

0 commit comments

Comments
 (0)