-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (46 loc) · 1.41 KB
/
latest.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
name: Master Build
on:
push:
branches: [ master ]
#defaults:
# run:
# # Having a global working directory will not work when more projects are added
# working-directory: ./CMR/python
jobs:
Test:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Checkout code
uses: actions/checkout@v2
- name: Update Version Info
run: |
pushd CMR/python
sed -i'' -e 's%{BUILD-REF}%${{ github.ref }}%g' cmr/__init__.py
sed -i'' -e "s%{BUILD-DATE}%$(date)%g" cmr/__init__.py
popd
- name: Run Unit Tests
run: ./runme.sh -t
working-directory: ./CMR/python
- name: Lint
run: ./runme.sh -l
working-directory: ./CMR/python
- name: Package
run: |
pip3 install wheel
python3 setup.py sdist bdist_wheel
working-directory: ./CMR/python
- uses: actions/upload-artifact@v2
with:
name: wheel
path: CMR/python/dist/eo_metadata_tools_cmr-*-py3-none-any.whl
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest-master"
prerelease: true
title: "Master Build"
files: CMR/python/dist/eo_metadata_tools_cmr-*-py3-none-any.whl