-
Notifications
You must be signed in to change notification settings - Fork 223
69 lines (58 loc) · 2.28 KB
/
publish-global-state-update-gen.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
---
name: publish-global-state-update-gen
on:
push:
tags:
- "v*"
jobs:
publish_deb:
strategy:
matrix:
include:
- os: ubuntu-18.04
code_name: bionic
- os: ubuntu-20.04
code_name: focal
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2
- uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c #v1.4.0
- name: Install deps
run: |
echo "deb http://repo.aptly.info/ squeeze main" | sudo tee -a /etc/apt/sources.list.d/aptly.list
wget -qO - https://www.aptly.info/pubkey.txt | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y awscli aptly=1.2.0
aptly config show
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@c8bb57c57e8df1be8c73ff3d59deab1dbc00e0d1 #v5.1.0
with:
gpg_private_key: ${{ secrets.APTLY_GPG_KEY }}
passphrase: ${{ secrets.APTLY_GPG_PASS }}
- name: Install cargo deb
run: cargo install cargo-deb
- name: Cargo build
run: cargo build -p global-state-update-gen --release
- name: Cargo deb
run: cargo deb -p global-state-update-gen --no-build --variant ${{ matrix.code_name }}
- name: Upload binaries to repo
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.APTLY_SECRET_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.APTLY_ACCESS_KEY }}
PLUGIN_REPO_NAME: ${{ secrets.APTLY_REPO }}
PLUGIN_REGION: ${{ secrets.APTLY_REGION }}
PLUGIN_GPG_KEY: ${{ secrets.APTLY_GPG_KEY }}
PLUGIN_GPG_PASS: ${{ secrets.APTLY_GPG_PASS }}
PLUGIN_ACL: 'public-read'
PLUGIN_PREFIX: 'releases'
PLUGIN_DEB_PATH: './target/debian'
PLUGIN_OS_CODENAME: ${{ matrix.code_name }}
run: ./ci/publish_deb_to_repo.sh
- name: Invalidate cloudfront
uses: chetan/invalidate-cloudfront-action@c384d5f09592318a77b1e5c0c8d4772317e48b25 #v2.4
env:
DISTRIBUTION: ${{ secrets.APTLY_DIST_ID }}
PATHS: "/*"
AWS_REGION: ${{ secrets.APTLY_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.APTLY_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.APTLY_SECRET_KEY }}