feat: update to released stable version and bump verisons #17
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: Build Release | |
| on: | |
| # This will trigger when a tag like v1.0.0 is pushed | |
| # will create a release | |
| push: | |
| tags: | |
| - "*.*.*" | |
| # Manual trigger for creating an artifact (button in the UI) | |
| workflow_dispatch: | |
| permissions: | |
| packages: write | |
| contents: write | |
| jobs: | |
| build-amd64: | |
| name: Build AMD64 | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the repo for building | |
| - uses: actions/checkout@v4 | |
| # Setup rust for building the service | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| targets: ${{ matrix.target }} | |
| override: true | |
| # Install zig for cargo lambda | |
| - name: Install zig | |
| run: pip3 install ziglang | |
| # Install cargo lambda | |
| - name: Install cargo-lambda | |
| run: curl -fsSL https://cargo-lambda.info/install.sh | sh | |
| # Compile the lambda binaries | |
| - name: Build lambda binaries | |
| run: cargo lambda build --output-format zip --release | |
| # Copy built binary to output directory | |
| - name: Copy binary to output | |
| run: | | |
| cp target/lambda/docbox-http-lambda/bootstrap.zip docbox-http-lambda-amd64.zip | |
| cp target/lambda/docbox-presigned-cleanup-lambda/bootstrap.zip docbox-presigned-cleanup-lambda-amd64.zip | |
| cp target/lambda/docbox-upload-completion-lambda/bootstrap.zip docbox-upload-completion-lambda-amd64.zip | |
| shell: bash | |
| # Build the docker layers | |
| - name: Build poppler layer | |
| run: | | |
| chmod +x ./layers/make-poppler-layer-amd64.sh | |
| bash ./layers/make-poppler-layer-amd64.sh | |
| shell: bash | |
| # Upload the built artifacts | |
| - name: Upload docbox-http-lambda.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docbox-http-lambda-amd64.zip | |
| path: docbox-http-lambda-amd64.zip | |
| - name: Upload docbox-presigned-cleanup-lambda-amd64.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docbox-presigned-cleanup-lambda-amd64.zip | |
| path: docbox-presigned-cleanup-lambda-amd64.zip | |
| - name: Upload docbox-upload-completion-lambda-amd64.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docbox-upload-completion-lambda-amd64.zip | |
| path: docbox-upload-completion-lambda-amd64.zip | |
| - name: Upload poppler-lambda-layer-amd64.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: poppler-lambda-layer-amd64.zip | |
| path: poppler-lambda-layer-amd64.zip | |
| build-arm64: | |
| name: Build ARM64 | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the repo for building | |
| - uses: actions/checkout@v4 | |
| # Setup rust for building the service | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| targets: ${{ matrix.target }} | |
| override: true | |
| # Install zig for cargo lambda | |
| - name: Install zig | |
| run: pip3 install ziglang | |
| # Install cargo lambda | |
| - name: Install cargo-lambda | |
| run: curl -fsSL https://cargo-lambda.info/install.sh | sh | |
| # Compile the lambda binaries | |
| - name: Build lambda binaries | |
| run: cargo lambda build --output-format zip --arm64 --release | |
| # Copy built binary to output directory | |
| - name: Copy binary to output | |
| run: | | |
| cp target/lambda/docbox-http-lambda/bootstrap.zip docbox-http-lambda-arm64.zip | |
| cp target/lambda/docbox-presigned-cleanup-lambda/bootstrap.zip docbox-presigned-cleanup-lambda-arm64.zip | |
| cp target/lambda/docbox-upload-completion-lambda/bootstrap.zip docbox-upload-completion-lambda-arm64.zip | |
| shell: bash | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| # Build the docker layers | |
| - name: Build poppler layer | |
| run: | | |
| chmod +x ./layers/make-poppler-layer-arm64.sh | |
| bash ./layers/make-poppler-layer-arm64.sh | |
| shell: bash | |
| # Upload the built artifacts | |
| - name: Upload docbox-http-lambda-arm64.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docbox-http-lambda-arm64.zip | |
| path: docbox-http-lambda-arm64.zip | |
| - name: Upload docbox-presigned-cleanup-lambda-arm64.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docbox-presigned-cleanup-lambda-arm64.zip | |
| path: docbox-presigned-cleanup-lambda-arm64.zip | |
| - name: Upload docbox-upload-completion-lambda-arm64.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docbox-upload-completion-lambda-arm64.zip | |
| path: docbox-upload-completion-lambda-arm64.zip | |
| - name: Upload poppler-lambda-layer-arm64.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: poppler-lambda-layer-arm64.zip | |
| path: poppler-lambda-layer-arm64.zip | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| needs: [build-amd64, build-arm64] | |
| steps: | |
| # Checkout the repo | |
| - uses: actions/checkout@v4 | |
| # Download all the compiled artifacts from previous | |
| # steps | |
| - name: Download all build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| # Create the github release if we pushed up a new tag | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| if: github.event_name == 'push' | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: v${{ github.ref_name }} | |
| draft: true | |
| files: dist/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |