Skip to content

run publish

run publish #1

Workflow file for this run

name: run publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHACHA_KEY: ${{ secrets.CHACHA_KEY }}
CARGO_LOCA: "kingsbur-core/Cargo.toml"
CARGO_BIN: "cli"
permissions:
contents: write
on:
workflow_dispatch:
inputs:
addr:
description: addr
required: true
type: string
default: "0"
vec:
description: vec
required: true
type: string
default: "0 0 0"
jobs:
pre:
runs-on: ubuntu-latest
outputs:
cargo_loc: ${{ env.CARGO_LOCA }}
cargo_bin: ${{ env.CARGO_BIN }}
steps:
- run: echo "Bypass Restriction"
cli:
runs-on: "ubuntu-latest"
outputs:
ref: ${{ steps.post.outputs.ref }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
run: |
sudo apt-get -qq install chromium-driver tmux
shell: bash
name: Install Chrome
-
run: |
curl -fsSL https://sh.rustup.rs | bash -s -- -y
source ~/.bashrc
shell: bash
name: Install Rust
-
id: post
run: |
tmux new-session -d -s chromedriver
tmux send-keys -t chromedriver 'chromedriver --port=9515' Enter
cargo build --release
{
./target/release/cli post ${{ inputs.addr }} ${{ inputs.vec }}
} >> $GITHUB_OUTPUT
shell: bash
name: Build and Run cli
publish:
needs:
- pre
- cli
uses: ./.github/workflows/bot.yml
with:
cargo_loc: ${{ needs.pre.outputs.cargo_loc }}
cargo_bin: ${{ needs.pre.outputs.cargo_bin }}
note: ${{ needs.cli.outputs.ref }}