update package versions (#1119) #1
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
name: release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
env: | |
EXPECTED_BITCOIN_DA_ID: ${{ vars.EXPECTED_BITCOIN_DA_ID }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
x86_64_binary_extraction: | |
runs-on: ubicloud-standard-30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
sudo apt update && sudo apt -y install curl gcc cpp cmake clang llvm | |
sudo apt -y autoremove && sudo apt clean && sudo rm -rf /var/lib/apt/lists/* | |
- name: Install Rust | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
- name: Install Cargo Binstall | |
run: | | |
source $HOME/.cargo/env | |
cargo install cargo-binstall | |
- name: Install Cargo Risczero | |
run: | | |
cargo binstall -y cargo-risczero | |
cargo risczero install --version v2024-04-22.0 | |
# TODO: do below on testnet launch | |
# curl -L https://risczero.com/install | bash; source /home/runner/.bashrc; rzup -v 1.0.5; | |
- name: Build Project | |
env: | |
REPR_GUEST_BUILD: 1 | |
run: | | |
cargo build --release | |
- name: Check BITCOIN_DA_ID | |
id: check-id | |
run: | | |
RESULT=$(grep -R "BITCOIN_DA_ID" target/ || echo "Grep failed") | |
if echo "$RESULT" | grep -q "${{ env.EXPECTED_BITCOIN_DA_ID }}"; then | |
echo "Check passed successfully." | |
else | |
echo "Check failed. Expected: BITCOIN_DA_ID ${{ env.EXPECTED_BITCOIN_DA_ID }} " | |
echo "Actual: $RESULT" | |
exit 1 | |
fi | |
- name: Upload x86_64 Binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: citrea_${{ github.ref_name }}_x86_64 | |
path: target/release/citrea | |
osx_arm64_binary_extraction: | |
runs-on: self-hosted-citrea-osx-arm64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
- name: Install Cargo Binstall | |
run: | | |
source $HOME/.cargo/env | |
cargo install cargo-binstall | |
- name: Install Cargo Risczero | |
run: | | |
source $HOME/.cargo/env | |
cargo binstall -y cargo-risczero | |
cargo risczero install --version v2024-04-22.0 | |
- name: Build Project | |
env: | |
REPR_GUEST_BUILD: 1 | |
run: | | |
source $HOME/.cargo/env | |
cargo build --release | |
- name: Check BITCOIN_DA_ID | |
id: check-id | |
run: | | |
RESULT=$(grep -R "BITCOIN_DA_ID" target/ || echo "Grep failed") | |
if echo "$RESULT" | grep -q "${{ env.EXPECTED_BITCOIN_DA_ID }}"; then | |
echo "Check passed successfully." | |
else | |
echo "Check failed. Expected: BITCOIN_DA_ID ${{ env.EXPECTED_BITCOIN_DA_ID }} " | |
echo "Actual: $RESULT" | |
exit 1 | |
fi | |
- name: Upload osx_arm64 Binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: citrea_${{ github.ref_name }}_osx_arm64 | |
path: target/release/citrea | |
release: | |
needs: [ x86_64_binary_extraction, osx_arm64_binary_extraction ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download x86_64 Binary | |
uses: actions/download-artifact@v4 | |
with: | |
name: citrea_${{ github.ref_name }}_x86_64 | |
path: release | |
- name: rename file | |
run: | | |
mv release/citrea release/citrea_${{ github.ref_name }}_x86_64 | |
- name: Download OSX ARM64 Binary | |
uses: actions/download-artifact@v4 | |
with: | |
name: citrea_${{ github.ref_name }}_osx_arm64 | |
path: release | |
- name: rename file | |
run: | | |
mv release/citrea release/citrea_${{ github.ref_name }}_osx_arm64 | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
release/citrea_${{ github.ref_name }}_osx_arm64 | |
release/citrea_${{ github.ref_name }}_x86_64 | |
name: Release ${{ github.ref_name }} | |
body: | | |
This is the release for version ${{ github.ref_name }}. | |
It includes: | |
- citrea_${{ github.ref_name }}_x86_64 | |
- citrea_${{ github.ref_name }}_osx_arm64 |