Skip to content

Commit 09b3d38

Browse files
authored
Merge branch 'main' into sidecar-node_util-functions
2 parents 219de94 + 9a935a6 commit 09b3d38

File tree

2 files changed

+7
-80
lines changed

2 files changed

+7
-80
lines changed

.github/workflows/casper-node-launcher-publish.yml

+6-75
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,5 @@
11
---
22
name: publish-casper-node-launcher
3-
4-
on:
5-
push:
6-
tags:
7-
- "v*.*.*"
8-
9-
jobs:
10-
publish_deb:
11-
strategy:
12-
matrix:
13-
include:
14-
- os: ubuntu-20.04
15-
code_name: focal
16-
17-
runs-on: ${{ matrix.os }}
18-
19-
steps:
20-
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2
21-
22-
- name: Install deps
23-
run: |
24-
echo "deb http://repo.aptly.info/ squeeze main" | sudo tee -a /etc/apt/sources.list.d/aptly.list
25-
wget -qO - https://www.aptly.info/pubkey.txt | sudo apt-key add -
26-
sudo apt-get update
27-
sudo apt-get install -y aptly=1.4.0
28-
aptly config show
29-
30-
- name: Import GPG key
31-
uses: crazy-max/ghaction-import-gpg@c8bb57c57e8df1be8c73ff3d59deab1dbc00e0d1 #v5.1.0
32-
with:
33-
gpg_private_key: ${{ secrets.APTLY_GPG_KEY }}
34-
passphrase: ${{ secrets.APTLY_GPG_PASS }}
35-
36-
- name: Install cargo deb
37-
run: cargo install cargo-deb
38-
39-
- name: Cargo build
40-
run: cargo build --release
41-
42-
- name: Cargo deb
43-
run: cargo deb --no-build --variant ${{ matrix.code_name }}
44-
45-
- name: Upload binaries to repo
46-
env:
47-
AWS_SECRET_ACCESS_KEY: ${{ secrets.APTLY_SECRET_KEY }}
48-
AWS_ACCESS_KEY_ID: ${{ secrets.APTLY_ACCESS_KEY }}
49-
PLUGIN_REPO_NAME: ${{ secrets.APTLY_REPO }}
50-
PLUGIN_REGION: ${{ secrets.APTLY_REGION }}
51-
PLUGIN_GPG_KEY: ${{ secrets.APTLY_GPG_KEY }}
52-
PLUGIN_GPG_PASS: ${{ secrets.APTLY_GPG_PASS }}
53-
PLUGIN_ACL: 'public-read'
54-
PLUGIN_PREFIX: 'releases'
55-
PLUGIN_DEB_PATH: './target/debian'
56-
PLUGIN_OS_CODENAME: ${{ matrix.code_name }}
57-
run: ./ci/publish_deb_to_repo.sh
58-
59-
- name: Invalidate cloudfront
60-
uses: chetan/invalidate-cloudfront-action@c384d5f09592318a77b1e5c0c8d4772317e48b25 #v2.4
61-
env:
62-
DISTRIBUTION: ${{ secrets.APTLY_DIST_ID }}
63-
PATHS: "/*"
64-
AWS_REGION: ${{ secrets.APTLY_REGION }}
65-
AWS_ACCESS_KEY_ID: ${{ secrets.APTLY_ACCESS_KEY }}
66-
AWS_SECRET_ACCESS_KEY: ${{ secrets.APTLY_SECRET_KEY }}
67-
68-
---
69-
name: publish-casper-sidecar-deb
703
permissions:
714
contents: read
725
id-token: write
@@ -83,15 +16,13 @@ jobs:
8316
include:
8417
- os: ubuntu-20.04
8518
code_name: focal
86-
# - os: ubuntu-22.04
87-
# code_name: jammy
88-
# - os: ubuntu-24.04
89-
# code_name: noble
9019

9120
runs-on: ${{ matrix.os }}
9221

9322
steps:
9423
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3.0.2
24+
with:
25+
key: ${{ matrix.code_name }}
9526

9627
- name: Configure AWS credentials
9728
uses: aws-actions/configure-aws-credentials@v4
@@ -108,9 +39,6 @@ jobs:
10839
sudo apt-get install -y aptly=1.4.0
10940
aptly config show
11041
111-
- name: update toolchain
112-
run: rustup update nightly
113-
11442
- name: Import GPG key
11543
uses: crazy-max/ghaction-import-gpg@c8bb57c57e8df1be8c73ff3d59deab1dbc00e0d1 #v5.1.0
11644
with:
@@ -120,8 +48,11 @@ jobs:
12048
- name: Install cargo deb
12149
run: cargo install cargo-deb
12250

51+
- name: Cargo build
52+
run: cargo build --release
53+
12354
- name: Cargo deb
124-
run: cargo deb --package casper-sidecar --variant ${{ matrix.code_name }}
55+
run: cargo deb --no-build --variant ${{ matrix.code_name }}
12556

12657
- name: Upload binaries to repo
12758
env:

ci/publish_deb_to_repo.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
# DEFAULTS
5-
PLUGIN_OS_CODENAME="${PLUGIN_OS_CODENAME:-bionic}"
6-
74
# Verify all variables are present
85
if [[ -z $PLUGIN_GPG_KEY || -z $PLUGIN_GPG_PASS || -z $PLUGIN_REGION \
96
|| -z $PLUGIN_REPO_NAME || -z $PLUGIN_ACL || -z $PLUGIN_PREFIX \
10-
|| -z $AWS_SECRET_ACCESS_KEY || -z $AWS_ACCESS_KEY_ID \
117
|| -z $PLUGIN_DEB_PATH || -z $PLUGIN_OS_CODENAME ]]; then
128
echo "ERROR: Environment Variable Missing!"
139
exit 1
1410
fi
1511

1612
# Verify if its the first time publishing. Will need to know later.
1713
# Probably an easier way to do this check :)
18-
EXISTS=$(aws s3 ls s3://"$PLUGIN_REPO_NAME"/releases/dists/ --region "$PLUGIN_REGION" | grep "$PLUGIN_OS_CODENAME") || EXISTS_RET="false"
14+
EXISTS_RET=$(aws s3 ls s3://"$PLUGIN_REPO_NAME"/releases/dists/ --region "$PLUGIN_REGION" | grep "$PLUGIN_OS_CODENAME") || EXISTS_RET="false"
1915

2016
# Sanity Check for later
2117
if [ "$EXISTS_RET" = "false" ]; then

0 commit comments

Comments
 (0)