mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add GitHub Actions workflow to publish packages
This commit is contained in:
parent
da0b9a4203
commit
aa280dfc64
4 changed files with 186 additions and 0 deletions
48
.github/workflows/release.yml
vendored
Normal file
48
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: Publish packages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'releases/**'
|
||||
tags:
|
||||
- v3
|
||||
- v3.*
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip poetry==1.0
|
||||
- name: Build wheel
|
||||
run: |
|
||||
poetry build
|
||||
- name: Publish to PyPI
|
||||
env:
|
||||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
|
||||
run: |
|
||||
poetry publish
|
||||
- name: Prepare AUR package
|
||||
env:
|
||||
AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}
|
||||
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
|
||||
GIT_NAME: ${{ secrets.GIT_NAME }}
|
||||
run: >
|
||||
docker build
|
||||
./.github/workflows/aur
|
||||
--build-arg AUR_SSH_KEY
|
||||
--build-arg aiogram_ver="$(git describe --tags ${GITHUB_REF}
|
||||
| sed -E 's/^v//')"
|
||||
--build-arg GIT_EMAIL
|
||||
--build-arg GIT_NAME
|
||||
-t aiogram/aur
|
||||
- name: Build and publish AUR package
|
||||
run: |
|
||||
docker run aiogram/aur build && docker run aiogram/aur publish
|
||||
Loading…
Add table
Add a link
Reference in a new issue