-
Notifications
You must be signed in to change notification settings - Fork 74
30 lines (29 loc) · 1.05 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
name: Check and realese cosmpy
# runs do release on main branch updated
# script checks for current package version and the latest tag on github
# if package version is newer it build, upload, tag and make a release page on github
# secrets PYPI_USERNAME and PYPI_PASSWORD are required!
on:
pull_request:
branches: [main]
types: [closed]
jobs:
build:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Run release script
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{secrets.FETCHBOT_PYPI_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required to make a release page
GH_TOKEN: ${{ github.token }}
run: |
pip install tomli packaging poetry
git config --global user.email "ci-bot@fetch.ai"
git config --global user.name "CI BOT"
python3 ./scripts/do-release.py