-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (35 loc) · 1.11 KB
/
release.yaml
File metadata and controls
39 lines (35 loc) · 1.11 KB
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
name: release
on:
push:
branches:
- master
jobs:
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: restore dependencies from cache
id: cache
uses: actions/cache@v2
with:
path: venv
key: ${{ runner.os }}-venv-${{ hashFiles('setup.py') }}
- name: install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: make deps
- name: release new version (if necessary)
run: |
git config user.name github-actions
git config user.email github-actions@github.com
. venv/bin/activate && semantic-release publish
env:
GH_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}