This repository was archived by the owner on Aug 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 80
80 lines (76 loc) · 2.25 KB
/
deployment.yml
File metadata and controls
80 lines (76 loc) · 2.25 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Deployment
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macOS-11] # TODO: Fix windows gmp.h not found issue, and add a windows binary
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8.12
uses: actions/setup-python@v2
with:
python-version: 3.8.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Build binary
run: |
poetry run poe build
- name: Run a smoke test with --help
run: |
./dist/starklings/starklings --help
- name: Pack binary into a tarball
run: tar -czvf starklings.tar.gz ./dist/starklings
- name: Upload the tarball
uses: actions/upload-artifact@v2
with:
name: starklings-${{ runner.os }}
path: starklings.tar.gz
publish:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
path: dist
- name: Upload macOS binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/starklings-macOS/starklings.tar.gz
asset_name: starklings-macOS.tar.gz
tag: ${{ github.ref }}
overwrite: true
- name: Upload Linux binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/starklings-Linux/starklings.tar.gz
asset_name: starklings-Linux.tar.gz
tag: ${{ github.ref }}
overwrite: true
release:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v2
- name: Initialize mandatory git config
run: |
git config user.name "GitHub Actions"
git config user.email noreply@github.com
- name: Checkout stable branch
run: |
git fetch origin
git checkout stable
- name: Reset on main
run: |
git reset --hard origin/main
git push --force origin stable