-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (46 loc) · 1.34 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Release
on:
release:
types: [published]
workflow_dispatch:
jobs:
release-pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: 'pip'
- name: Build and Publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install -r requirements.txt;
python setup.py sdist bdist_wheel
twine upload dist/* --verbose
release-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup environment
run: |
echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
- name: Login to DockerHub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push docker image
uses: docker/build-push-action@v3.1.1
with:
context: .
file: ./Dockerfile
tags: |
althack/mkdocs-simple-plugin:latest
althack/mkdocs-simple-plugin:${{ env.VERSION }}
push: true