This repository was archived by the owner on Jul 21, 2025. It is now read-only.
v1.2.3 #1
Workflow file for this run
This file contains hidden or 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: Main Release | |
| on: | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| env: | |
| APP_NAME: rce-engine | |
| ARCHIVE_NAME: rce-engine_linux-x64.tar.gz | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install latest rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Prepare upload url | |
| run: | | |
| UPLOAD_URL="$(jq -r '.release.upload_url' "$GITHUB_EVENT_PATH" | sed -e "s/{?name,label}$/?name=${ARCHIVE_NAME}/")" | |
| echo "UPLOAD_URL=${UPLOAD_URL}" >> $GITHUB_ENV | |
| - name: Build binary | |
| run: | | |
| cargo build --release | |
| tar -czf "${ARCHIVE_NAME}" -C target/release "${APP_NAME}" | |
| - name: Upload binary | |
| uses: shogo82148/actions-upload-release-asset@v1 | |
| with: | |
| upload_url: ${{ env.UPLOAD_URL }} | |
| asset_path: ${{ env.ARCHIVE_NAME }} | |
| asset_name: ${{ env.ARCHIVE_NAME }} | |
| asset_content_type: application/gzip | |
| github_token: ${{ secrets.GH_TOKEN }} | |
| post-build: | |
| name: Post Build | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up nix | |
| uses: cachix/install-nix-action@v27 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-24.05 | |
| github_access_token: ${{ secrets.GH_TOKEN }} | |
| - name: Nix build | |
| run: | | |
| nix-build -o result/rce-engine docker.nix | |
| - name: Load image | |
| run: | | |
| docker load -i result/rce-engine | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
| - name: Push image | |
| run: | | |
| docker push toolkithub/rce-engine:edge |