-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.build.yml
33 lines (33 loc) · 926 Bytes
/
.build.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
image: alpine/edge
secrets:
- 1de21540-637b-46b0-886c-28fc43800e86
environment:
REPO: term-assist
GH_USER: logkirk
packages:
- python3-dev
- py3-pip
tasks:
- build: |
cd term-assist
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade build
python3 -m build
mv dist/*.whl dist/term_assist.whl
- write-ssh-config: |
cat <<_FILE_ >> ~/.ssh/config
Host github.com
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
BatchMode yes
StrictHostKeyChecking no
_FILE_
- push-to-github: |
cd ~/"${REPO}"
# remove remotes/origin/HEAD so we don't push it
git remote set-head origin -d
git remote add github "[email protected]:${GH_USER}/${REPO}.git"
git push --prune github '+refs/remotes/origin/*:refs/heads/*' '+refs/tags/*:refs/tags/*'
artifacts:
- term-assist/dist/term_assist.whl