Revert "Manually downgrading plerkle serialization version so I can b… #72
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- "v*" | |
env: | |
CARGO_TERM_COLOR: always | |
IMAGE_NAME: plerkle-test-validator | |
RUST_VERSION: 1.69.0 | |
SOLANA_VERSION_STABLE: v1.16.6 | |
jobs: | |
release-stable: | |
runs-on: buildjet-8vcpu-ubuntu-2004 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set env vars | |
run: | | |
source ci/env.sh | |
echo "GEYSER_PLUGIN_NAME=$plugin_name" | tee -a $GITHUB_ENV | |
echo "GEYSER_PLUGIN_LIB=lib${plugin_lib_name}" | tee -a $GITHUB_ENV | |
- if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get upgrade | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" | |
sudo apt-get update | |
sudo apt-get install -y libudev-dev libssl-dev libsasl2-dev libzstd-dev | |
sudo apt-get install -y openssl --allow-unauthenticated | |
sudo apt-get install -y libssl1.1 --allow-unauthenticated | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ env.RUST_VERSION }} | |
override: true | |
profile: minimal | |
components: rustfmt | |
- name: Build Plugin | |
run: | | |
echo "CI_TAG=${GITHUB_REF#refs/*/}" >> "$GITHUB_ENV" | |
echo "CI_OS_NAME=linux" >> "$GITHUB_ENV" | |
cargo build --release | |
- name: Build release tarball | |
run: ./ci/create-tarball.sh | |
- name: Publish to crates registry | |
run: | | |
cargo publish -p plerkle_serialization --token $CARGO_TOKEN --no-verify || true | |
sleep 30 | |
cargo publish -p plerkle_messenger --token $CARGO_TOKEN --no-verify || true | |
shell: bash | |
env: | |
CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: STABLE ${{ env.CI_TAG }} | |
body: | | |
## STABLE VERSION: | |
Reccomended for Mainnet | |
${{ env.GEYSER_PLUGIN_NAME }} ${{ env.CI_TAG }} | |
solana ${{ env.SOLANA_VERSION_STABLE }} | |
rust ${{ env.RUST_VERSION }} | |
files: | | |
${{ env.GEYSER_PLUGIN_NAME }}-release-* | |
push-stable: | |
runs-on: ubuntu-latest | |
needs: release-stable | |
permissions: | |
packages: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build image | |
run: docker build . --file Solana.Dockerfile --tag $IMAGE_NAME --label 'runnumber=${GITHUB_RUN_ID}' | |
- name: Log in to registry | |
run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login ghcr.io -u $ --password-stdin | |
- name: Push image Stable | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
CI_TAG=${GITHUB_REF#refs/*/} | |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
# Strip git ref prefix from version | |
VERSION=$CI_TAG | |
echo IMAGE_ID=$IMAGE_ID | |
export TAG=$VERSION-${{ env.RUST_VERSION }}-${{ env.SOLANA_VERSION_STABLE }} | |
echo VERSION=$TAG | |
docker tag $IMAGE_NAME $IMAGE_ID:$TAG | |
docker push $IMAGE_ID:$TAG |