-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.77 KB
/
python-package.yml
File metadata and controls
54 lines (47 loc) · 1.77 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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Bundle and draft release
on:
push:
branches: [ main ]
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- name: Draft release notes
id: draft
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Map a step output to a job output
outputs:
tag_name: ${{ steps.draft.outputs.tag_name }}
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [2.7]
needs: [update_release_draft]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get bundle dependencies
run: |
if [ -f requirements.txt ]; then pip install -t Cagent.bundle/Contents/Libraries/Shared/ --no-compile --no-binary=:all -r requirements.txt; fi
pip install -t Cagent.bundle/Contents/Libraries/Shared/ --no-compile --no-binary=:all requests beautifulsoup4 fuzzywuzzy
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
- name: Upload artefact to release
run: |
zip -r Cagent.bundle.zip ./Cagent.bundle
gh release upload --clobber ${{ env.VERSION }} ${{ env.FILES }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ needs.update_release_draft.outputs.tag_name }}
FILES: Cagent.bundle.zip