forked from maticnetwork/bor
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (53 loc) · 2.1 KB
/
linuxpackage.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
name: Linux package
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.15.5
- name: Set up Ruby 2.6
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6
- name: Retrieve release version
run: |
echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Build package
run: |
set -x
echo "Release version: ${{ env.RELEASE_VERSION }}"
sudo apt-get -yqq install libpq-dev build-essential
gem install --no-document fpm
fpm --version
make bor-all
fpm -s dir -t deb --deb-user root --deb-group root -n matic-bor -v ${{ env.RELEASE_VERSION }} \
build/bin/bor=/usr/bin/ \
build/bin/bootnode=/usr/bin/
mkdir packages-v${{ env.RELEASE_VERSION }}
mv matic-bor_${{ env.RELEASE_VERSION }}_amd64.deb packages-v${{ env.RELEASE_VERSION }}/
ls packages-v${{ env.RELEASE_VERSION }}/
- name: S3 upload
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-east-1" # optional: defaults to us-east-1
SOURCE_DIR: "packages-v${{ env.RELEASE_VERSION }}"
DEST_DIR: "v${{ env.RELEASE_VERSION }}"
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2.0.0
env:
SLACK_CHANNEL: code-releases
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: "New linux package for Bor v${{ env.RELEASE_VERSION }} just got released"
SLACK_MESSAGE: "Package has been uploaded to S3 bucket for public use and available at https://matic-public.s3.amazonaws.com/v${{ env.RELEASE_VERSION }}/matic-bor_${{ env.RELEASE_VERSION }}_amd64.deb"