-
Notifications
You must be signed in to change notification settings - Fork 5
67 lines (50 loc) · 1.64 KB
/
publish.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
name: publish
on:
push:
tags:
- '*'
jobs:
PyPI:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: 3.11
- name: Install pypa/build
run: python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
Anaconda:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Publish to Anaconda Cloud
uses: m0nhawk/conda-package-publish-action@master
with:
subDir: '.'
AnacondaUsername: ${{ secrets.ANACONDA_USERNAME }}
AnacondaPassword: ${{ secrets.ANACONDA_PASSWORD }}
DockerHub:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build & Publish image to DockerHub
env:
docker_username: ${{ secrets.DOCKER_USERNAME }}
docker_password: ${{ secrets.DOCKER_PASSWORD }}
run: |
repo_name="moranpycess"
tag=${GITHUB_REF##*/}
docker build -t angrymaciek/${repo_name}:latest .
docker tag angrymaciek/${repo_name} angrymaciek/${repo_name}:${tag}
echo $docker_password | docker login -u $docker_username --password-stdin
docker push angrymaciek/${repo_name}:${tag}