forked from rsyi/whale
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (69 loc) · 2.14 KB
/
cd.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CD
on:
push:
tags:
- '*'
jobs:
release-pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Build wheel
working-directory: ./pipelines
run: |
pip install --upgrade setuptools wheel
python setup.py sdist bdist_wheel --universal
- name: Deploy to Pypi
uses: pypa/gh-action-pypi-publish@v1.2.1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: pipelines/dist/
release-osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build Release
run: |
tar -zcvf /tmp/whale-mac.tar.gz .
- name: Get version
id: get_version
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
- name: Set SHA
id: shasum
run: |
echo ::set-output name=sha::"$(shasum -a 256 /tmp/whale-mac.tar.gz | awk '{printf $1}')"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /tmp/whale-mac.tar.gz
asset_name: whale-mac.tar.gz
asset_content_type: application/gzip
- name: Bump Brew
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.BREW_TOKEN }}
run: |
brew tap dataframehq/tap
brew bump-formula-pr -f --version=${{ steps.get_version.outputs.version }} --no-browse --no-audit \
--sha256=${{ steps.shasum.outputs.sha }} \
--url="https://github.com/dataframehq/whale/releases/download/${{ steps.get_version.outputs.version }}/whale-mac.tar.gz" \
dataframehq/tap/whale