Skip to content

Commit 0c68008

Browse files
authored
Merge pull request #54 from Shimwell/pypi_Action
Pypi action
2 parents 84ef885 + c8a49aa commit 0c68008

File tree

3 files changed

+68
-1
lines changed

3 files changed

+68
-1
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This yml file will trigger a Github Actions event that builds and upload the
2+
# Python package to TestPyPI. This makes use of Twine and is triggered when a
3+
# push to the master branch occures. For more information see:
4+
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
5+
6+
name: Upload Python Package
7+
8+
on:
9+
push:
10+
branches:
11+
- develop
12+
13+
jobs:
14+
deploy:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: '3.x'
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install setuptools wheel twine
28+
- name: Build and publish
29+
env:
30+
TWINE_USERNAME: __token__
31+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
32+
run: |
33+
python setup.py sdist bdist_wheel
34+
twine upload --repository testpypi dist/*
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This yml file will trigger a Github Actions event that builds and upload the
2+
# Python package to PiPy. This makes use of Twine and is triggered when a push
3+
# to the master branch occures. For more information see:
4+
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
5+
6+
name: Upload Python Package
7+
8+
on:
9+
release:
10+
types: [created]
11+
12+
jobs:
13+
deploy:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: '3.x'
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install setuptools wheel twine
27+
- name: Build and publish
28+
env:
29+
TWINE_USERNAME: __token__
30+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
31+
run: |
32+
python setup.py sdist bdist_wheel
33+
twine upload dist/*

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2011-2020 Massachusetts Institute of Technology and OpenMC contributors
1+
Copyright (c) 2011-2021 UChicago Argonne, LLC and OpenMC contributors
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of
44
this software and associated documentation files (the "Software"), to deal in

0 commit comments

Comments
 (0)