-
Notifications
You must be signed in to change notification settings - Fork 19
56 lines (54 loc) · 1.99 KB
/
Copy pathmake_release.yml
File metadata and controls
56 lines (54 loc) · 1.99 KB
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
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "*.*.*" # Push events to matching semver versioning
name: Create Release
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
if: github.repository == 'david-hoffman/dphtools'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel
- name: build
run: |
python setup.py sdist bdist_wheel
# - name: Create Release
# id: create_release
# uses: actions/create-release@latest
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body: ${{ github.event.head_commit.message }}
# draft: false
# prerelease: ${{ contains(github.ref, 'rc') }}
- name: Publish distribution 📦 to Test PyPI
if: success() && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TESTPYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
# if the test build works, try a real build if rc isn't part of the name
if: success() && !contains(github.ref, 'rc')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
- name: Publish Conda package to Anaconda.org
if: success() && !contains(github.ref, 'rc')
uses: maxibor/conda-package-publish-action@v1.1
with:
subDir: "conda.recipe"
AnacondaToken: ${{ secrets.ANACONDA_TOKEN }}