-
Notifications
You must be signed in to change notification settings - Fork 17
68 lines (63 loc) · 1.93 KB
/
release.yaml
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
---
name: "tagged-release"
on:
push:
tags:
- "v*"
jobs:
prepublish-check:
name: "Check that the project is releaseable"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install ubuntu packages
run: shotover-proxy/build/install_ubuntu_packages.sh
- name: Run checks
run: shotover-proxy/build/is_releasable.sh
publish-image:
name: "Publish Docker Image to Docker Hub"
needs: prepublish-check
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Push image
run: |
docker build -t shotover/shotover-proxy:latest -t shotover/shotover-proxy:${GITHUB_REF/refs\/tags\//} .
docker push shotover/shotover-proxy:latest
docker push shotover/shotover-proxy:${GITHUB_REF/refs\/tags\//}
publish-binary:
name: "Publish Binary to GitHub"
needs: prepublish-check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install ubuntu packages
run: shotover-proxy/build/install_ubuntu_packages.sh
- name: Build & test
run: shotover-proxy/build/build_release.sh
- name: Publish
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
files: |
*.tar.gz
publish-crates-io:
name: "Publish to crates.io"
needs: prepublish-check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install ubuntu packages
run: shotover-proxy/build/install_ubuntu_packages.sh
- name: Publish
run: |
cd shotover
cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}