-
Notifications
You must be signed in to change notification settings - Fork 84
33 lines (32 loc) · 1.06 KB
/
release.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
name: Release
on:
release:
types: [published]
jobs:
release_to_pypi:
name: Release to PyPi
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.7
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
pip-
- run: pip install -r requirements.txt
- run: pip install twine
# remove first character (v) from tag name
- run: ./scripts/ci-deploy.sh ${TAG#?}
env:
TAG: ${{ github.event.release.tag_name }}
CODALAB_DOCKER_USERNAME: ${{ secrets.CODALAB_DOCKER_USERNAME }}
CODALAB_DOCKER_PASSWORD: ${{ secrets.CODALAB_DOCKER_PASSWORD }}
# Uses trusted publishing to authenticate to PyPI: see https://docs.pypi.org/trusted-publishers/using-a-publisher/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1