mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
87 lines
3.1 KiB
YAML
87 lines
3.1 KiB
YAML
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.13
|
|
|
|
- name: Set up Ruby 2.6
|
|
uses: actions/setup-ruby@v1
|
|
with:
|
|
ruby-version: 2.6
|
|
|
|
- name: Retrieve release version
|
|
run: echo "::set-env name=RELEASE_VERSION::${GITHUB_REF/refs\/tags\/v/}"
|
|
|
|
- name: Build package
|
|
run: |
|
|
set -x
|
|
|
|
sudo apt-get -yqq install libpq-dev build-essential
|
|
gem install --no-document fpm
|
|
fpm --version
|
|
|
|
make bor
|
|
|
|
cat > bor.service <<- "EOF"
|
|
[Unit]
|
|
Description=bor
|
|
[Service]
|
|
WorkingDirectory=/etc/bor/
|
|
EnvironmentFile=/etc/bor/metadata
|
|
ExecStart=/bin/bash -c "/usr/bin/bor --datadir /etc/bor/dataDir --port '30303' --rpc --rpcaddr '0.0.0.0' --rpcvhosts '*' --rpccorsdomain '*' --rpcport '8545' --ipcpath /etc/bor/bor.ipc --rpcapi 'db,eth,net,web3,txpool,bor' --networkid ${NETWORK_ID} --miner.gaslimit '20000000' --txpool.nolocals --txpool.accountslots '128' --txpool.globalslots '20000' --txpool.lifetime '0h16m0s' --keystore /etc/bor/dataDir/keystore --unlock ${VALIDATOR_ADDRESS} --password /etc/bor/dataDir/password.txt --allow-insecure-unlock --maxpeers 150 --mine"
|
|
Type=simple
|
|
User=root
|
|
EOF
|
|
|
|
cat > after_install.sh <<- "EOF"
|
|
#!/bin/bash
|
|
touch /etc/bor/metadata
|
|
EOF
|
|
|
|
cat > metadata <<- "EOF"
|
|
NETWORK_ID=
|
|
VALIDATOR_ADDRESS=
|
|
EOF
|
|
|
|
fpm -s dir -t deb --deb-user root --deb-group root -n matic-bor -v ${{ env.RELEASE_VERSION }} \
|
|
--after-install after_install.sh \
|
|
bor.service=/etc/systemd/system/ \
|
|
build/bin/bor=/usr/bin/ \
|
|
metadata=/etc/bor/
|
|
|
|
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"
|