forked from beeware/rubicon-objc
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 1.76 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
name: Create Release
on:
push:
tags:
- "v*"
jobs:
ci:
uses: ./.github/workflows/ci.yml
release:
name: Create Release
needs: ci
# This has to be run on macOS, because rubicon tries to load the Foundation library
runs-on: macOS-latest
permissions:
contents: write
steps:
- name: Set build variables
run: |
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.X"
- name: Get packages
uses: actions/[email protected]
with:
name: packages
path: dist
- name: Install packages
run: pip install dist/rubicon_objc-*.whl
- name: Check version number
# Check that the setuptools_scm-generated version number is still the same when
# installed from a wheel with setuptools_scm not present.
run: |
set -x
test $(python -c "from rubicon.objc import __version__; print(__version__)") = $VERSION
- name: Create Release
uses: ncipollo/[email protected]
with:
name: ${{ env.VERSION }}
draft: true
artifacts: dist/*
artifactErrorsFailBuild: true
test-publish:
name: Publish test package
needs: [release]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Get packages
uses: actions/[email protected]
with:
name: packages
path: dist
- name: Publish release to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/
password: ${{ secrets.TEST_PYPI_PASSWORD }}