-
-
Notifications
You must be signed in to change notification settings - Fork 671
79 lines (70 loc) · 1.85 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
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
name: Create Release
on:
push:
tags:
- 'v*'
jobs:
ci:
uses: ./.github/workflows/ci.yml
docs:
name: Verify Docs Build
uses: beeware/.github/.github/workflows/docs-build-verify.yml@main
secrets: inherit
with:
project-name: "toga"
project-version: ${{ github.ref_name }}
release:
name: Create GitHub release
needs: [ ci, docs ]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set build variables
run: |
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Get packages
uses: actions/download-artifact@v3.0.2
with:
name: ${{ needs.ci.outputs.artifact-name }}
- name: Create release
uses: ncipollo/release-action@v1.13.0
with:
name: ${{ env.VERSION }}
draft: true
artifacts: "*/dist/*"
artifactErrorsFailBuild: true
deploy-test:
name: Publish to TestPyPI
runs-on: ubuntu-latest
needs: [ci, release]
permissions:
# This permission is required for trusted publishing.
id-token: write
strategy:
matrix:
package:
- "toga"
- "toga_android"
- "toga_cocoa"
- "toga_core"
- "toga_demo"
- "toga_dummy"
- "toga_gtk"
- "toga_iOS"
- "toga_textual"
- "toga_web"
- "toga_winforms"
steps:
- name: Get packages
uses: actions/download-artifact@v3.0.2
with:
name: ${{ needs.ci.outputs.artifact-name }}
- name: Extract ${{ matrix.package }}
run: |
mkdir dist
mv */dist/$(echo ${{ matrix.package }} | sed 's/_/?/')-[0-9]* dist
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/