-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yml
53 lines (49 loc) · 1.42 KB
/
action.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
name: 'Publish wheels to anaconda.org'
description: 'Publish wheels to anaconda.org and optionally clear out old wheels'
branding:
icon: package
color: blue
inputs:
anaconda_user:
description: Anaconda.org user or organisation
required: true
default: ''
type: string
anaconda_package:
description: Anaconda.org package (required if keep_n_latest is specified)
required: false
default: ''
type: string
anaconda_token:
description: Anaconda.org token
required: true
default: ''
type: string
keep_n_latest:
description: If specified, only this number of the most recent versions are kept
required: false
default: -1
type: number
runs:
using: "composite"
steps:
- uses: conda-incubator/setup-miniconda@v3
- name: Upload to Anaconda.org
run: |
conda install --yes anaconda-client
anaconda --token "${{ inputs.anaconda_token }}" upload \
--user "${{ inputs.anaconda_user }}" \
--skip-existing \
dist/*
shell: bash -l {0}
- name: Install click
run: pip install click
shell: bash -l {0}
- name: Clean up old wheels on Anaconda.org
run: |
python ${{ github.action_path }}/remove_old_wheels.py \
--token "${{ inputs.anaconda_token }}" \
--user "${{ inputs.anaconda_user }}" \
--package "${{ inputs.anaconda_package }}" \
--keep ${{ inputs.keep_n_latest }}
shell: bash -l {0}