diff --git a/.github/actions/artifacts/build-pc-artifacts/action.yml b/.github/actions/artifacts/build-pc-artifacts/action.yml index d162bf5a3..bb6041b99 100644 --- a/.github/actions/artifacts/build-pc-artifacts/action.yml +++ b/.github/actions/artifacts/build-pc-artifacts/action.yml @@ -1,9 +1,6 @@ name: "Build and Upload PC Artifacts" description: "Build and upload partner-chains artifacts for Linux, macOS x86_64, and macOS arm64" inputs: - sha: - description: "partner-chains commit SHA or branch to build from" - required: true tag: description: "partner-chains release tag to append to artifact name" required: true @@ -28,14 +25,10 @@ runs: echo "PARTNER_CHAINS_NODE=partner-chains-node-${{ inputs.tag }}-aarch64-apple-darwin" >> $GITHUB_ENV fi - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ inputs.sha }} - - name: Install protoc shell: bash run: | + cd $GITHUB_WORKSPACE if [[ "${{ inputs.os }}" == "linux" ]]; then sudo apt-get install -y protobuf-compiler elif [[ "${{ inputs.os }}" == "macos-x86_64" ]]; then @@ -49,37 +42,45 @@ runs: fi - name: Build partner-chains-node + shell: bash run: | + cd $GITHUB_WORKSPACE if [[ "${{ inputs.os }}" == "linux" ]]; then rustup target add x86_64-unknown-linux-gnu cargo build -p partner-chains-node --locked --release --target x86_64-unknown-linux-gnu cp target/x86_64-unknown-linux-gnu/release/partner-chains-node $PARTNER_CHAINS_NODE + chmod +x $PARTNER_CHAINS_NODE # Added chmod command elif [[ "${{ inputs.os }}" == "macos-x86_64" ]]; then rustup target add x86_64-apple-darwin cargo build -p partner-chains-node --locked --release --target x86_64-apple-darwin cp target/x86_64-apple-darwin/release/partner-chains-node $PARTNER_CHAINS_NODE + chmod +x $PARTNER_CHAINS_NODE # Added chmod command elif [[ "${{ inputs.os }}" == "macos-arm64" ]]; then rustup target add aarch64-apple-darwin cargo build -p partner-chains-node --locked --release --target aarch64-apple-darwin cp target/aarch64-apple-darwin/release/partner-chains-node $PARTNER_CHAINS_NODE + chmod +x $PARTNER_CHAINS_NODE # Added chmod command fi - shell: bash - name: Build partner-chains-cli shell: bash run: | + cd $GITHUB_WORKSPACE if [[ "${{ inputs.os }}" == "linux" ]]; then rustup target add x86_64-unknown-linux-gnu cargo build -p partner-chains-cli --locked --release --target x86_64-unknown-linux-gnu cp target/x86_64-unknown-linux-gnu/release/partner-chains-cli $PARTNER_CHAINS_CLI + chmod +x $PARTNER_CHAINS_CLI # Added chmod command elif [[ "${{ inputs.os }}" == "macos-x86_64" ]]; then rustup target add x86_64-apple-darwin cargo build -p partner-chains-cli --locked --release --target x86_64-apple-darwin cp target/x86_64-apple-darwin/release/partner-chains-cli $PARTNER_CHAINS_CLI + chmod +x $PARTNER_CHAINS_CLI # Added chmod command elif [[ "${{ inputs.os }}" == "macos-arm64" ]]; then rustup target add aarch64-apple-darwin cargo build -p partner-chains-cli --locked --release --target aarch64-apple-darwin cp target/aarch64-apple-darwin/release/partner-chains-cli $PARTNER_CHAINS_CLI + chmod +x $PARTNER_CHAINS_CLI # Added chmod command fi - name: Upload partner-chains-cli artifact diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index a71bece51..5019b38f8 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -34,7 +34,6 @@ jobs: - name: Build and Upload for Linux uses: ./.github/actions/artifacts/build-pc-artifacts with: - sha: ${{ inputs.sha }} tag: ${{ inputs.tag }} os: linux @@ -47,11 +46,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: master + ref: ${{ inputs.sha }} - name: Build and Upload for macOS x86_64 uses: ./.github/actions/artifacts/build-pc-artifacts with: - sha: ${{ inputs.sha }} tag: ${{ inputs.tag }} os: macos-x86_64 @@ -64,11 +62,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: master + ref: ${{ inputs.sha }} - name: Build and Upload for macOS arm64 uses: ./.github/actions/artifacts/build-pc-artifacts with: - sha: ${{ inputs.sha }} tag: ${{ inputs.tag }} os: macos-arm64