Skip to content

Commit fa4c7c0

Browse files
authored
[TOOLSLIBS-412] Github Actions for Release (#184)
* renames test yaml * adds pypi build and uploadd test repo * renames files and creates release * use github env * correct triggers and env
1 parent 89d3168 commit fa4c7c0

File tree

3 files changed

+72
-1
lines changed

3 files changed

+72
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Pypi Test Build and Upload
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@master
14+
- name: Set up Python 3.9 for build
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.9
18+
19+
- name: Install pypa/build
20+
run: >-
21+
python -m
22+
pip install
23+
build
24+
--user
25+
- name: Build binary wheel and source tarball
26+
run: >-
27+
python -m
28+
build
29+
--sdist
30+
--wheel
31+
--outdir dist/
32+
- name: Publish to test Pypi
33+
if: ${{github.repository == 'urbanairship/python-library-dev'}}
34+
uses: pypa/gh-action-pypi-publish@master
35+
with:
36+
password: ${{ secrets.PYPI_TEST_TOKEN }}
37+
repository_url: https://test.pypi.org/legacy/
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release Publish and Upload
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@master
12+
- name: Set up Python 3.9 for build
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: 3.9
16+
17+
- name: Install pypa/build
18+
run: >-
19+
python -m
20+
pip install
21+
build
22+
--user
23+
- name: Build binary wheel and source tarball
24+
run: >-
25+
python -m
26+
build
27+
--sdist
28+
--wheel
29+
--outdir dist/
30+
- name: Publish to Pypi
31+
if: ${{github.repository == 'urbanairship/python-library-dev'}}
32+
uses: pypa/gh-action-pypi-publish@master
33+
with:
34+
password: ${{ secrets.PYPI_TOKEN_URBANAIRSHIP }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python package
1+
name: Python Test
22

33
on: [push]
44

0 commit comments

Comments
 (0)