-
Notifications
You must be signed in to change notification settings - Fork 25
54 lines (45 loc) · 1.74 KB
/
release.yaml
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
name: Publish Python 🐍 distributions 📦 to PyPI
on:
release:
types:
- published
jobs:
build-n-publish:
name: Publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set buildx alias
run: docker buildx install
- name: Install docker pushrm
run: |
sudo wget https://github.com/christian-korneck/docker-pushrm/releases/download/v1.9.0/docker-pushrm_linux_amd64 -O /usr/libexec/docker/cli-plugins/docker-pushrm
sudo chmod +x /usr/libexec/docker/cli-plugins/docker-pushrm
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Tag components
run: ./scripts/tag_components.sh -o $GITHUB_REF_NAME -n latest
- name: Tag data explorer
run: ./scripts/tag_explorer.sh -o $GITHUB_REF_NAME -n latest
- name: Download distributions from test.PyPI
run: |
pip install --upgrade pip
pip download fondant==$GITHUB_REF_NAME -d dist --index-url https://test.pypi.org/simple/ --no-deps --only-binary fondant
pip download fondant==$GITHUB_REF_NAME -d dist --index-url https://test.pypi.org/simple/ --no-deps --no-binary fondant
- name: Publish distribution 📦 to PyPI if triggered by release
uses: pypa/gh-action-pypi-publish@v1.8.6
with:
name: pypi
url: https://pypi.org/p/fondant