-
Notifications
You must be signed in to change notification settings - Fork 6
65 lines (54 loc) · 1.64 KB
/
release.yml
File metadata and controls
65 lines (54 loc) · 1.64 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Release
# Triggers
on:
release:
types: [published]
# Specify what jobs to run
jobs:
Build_Release:
name: Build_Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
# version 1.2
- name: Install Poetry
uses: dschep/install-poetry-action@db2e37f48d1b1cd1491c4590338ebc7699adb425
# We do not need dependencies for build or publish (native Poetry)
# - name: Install Dependencies
# run: poetry install
- name: Build
working-directory: .
run: poetry build
- name: Archive production artifacts
uses: actions/upload-artifact@v1
with:
name: dist
path: dist
- name: publish
working-directory: .
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
# Success / Failure, publish to Slack
- name: Notify slack success
if: success()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@51259479e07a6e3c44b826b39b771be8106142ba
with:
channel: lambda-cache
status: SUCCESS
color: good
- name: Notify slack fail
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@51259479e07a6e3c44b826b39b771be8106142ba
with:
channel: lambda-cache
status: FAILED
color: danger