forked from bernhard-42/ocp-tessellate
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.2 KB
/
release.yml
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
name: Release
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to release'
required: true
permissions:
contents: write
id-token: write
jobs:
release:
name: Publish release
runs-on: ubuntu-latest
steps:
# see https://github.com/marketplace/actions/download-workflow-artifact
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: build_wheels.yml
path: wheels
- name: Organize wheels
run: |
mkdir dist
for artifact in wheels/*; do
for whl in "$artifact"/*.whl; do
mv "$whl" "dist/"
done
done
rm -rf wheels
ls dist
# see https://github.com/marketplace/actions/create-release
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*.whl"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.tag }}
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}