-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (84 loc) · 3.88 KB
/
github-release.yml
File metadata and controls
94 lines (84 loc) · 3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Create Github Release
on:
workflow_call:
inputs:
version:
required: true
type: string
jobs:
release:
name: Publish Python Wheel
runs-on: ubuntu-latest
steps:
- name: Download Source Tarball
uses: actions/download-artifact@v4
with:
name: Source Tarball
path: dist
- name: Download x86 Python Package Artifacts
uses: actions/download-artifact@v4
with:
name: Python Wheel x86_64
path: dist
- name: Download arm64 Python Package Artifacts
uses: actions/download-artifact@v4
with:
name: Python Wheel aarch64
path: dist
- name: Download Windows Python Package Artifacts
uses: actions/download-artifact@v4
with:
name: Python Wheel Windows
path: dist
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: "v${{ inputs.version }}"
release_name: "Release v${{ inputs.version }}"
body: |
Release ${{ inputs.version }}
draft: false
prerelease: false
- name: Upload Source Tarball
id: upload-release-asset-source
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: dist/gdbdbg-${{ inputs.version }}.tar.gz
asset_name: gdbdbg-${{ inputs.version }}.tar.gz
asset_content_type: application/tar+gzip
- name: Upload x86-64 Wheel
id: upload-release-asset-x86_64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: dist/gdbdbg-${{ inputs.version }}-py3-none-manylinux_2_17_x86_64.whl
asset_name: gdbdbg-${{ inputs.version }}-py3-none-manylinux_2_17_x86_64.whl
asset_content_type: application/zip
- name: Upload arm64 Wheel
id: upload-release-asset-aarch64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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
asset_path: dist/gdbdbg-${{ inputs.version }}-py3-none-manylinux_2_17_aarch64.whl
asset_name: gdbdbg-${{ inputs.version }}-py3-none-manylinux_2_17_aarch64.whl
asset_content_type: application/zip
- name: Upload Windows Wheel
id: upload-release-asset-windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/gdbdbg-${{ inputs.version }}-py3-none-win_amd64.whl
asset_name: gdbdbg-${{ inputs.version }}-py3-none-win_amd64.whl
asset_content_type: application/zip