Merge pull request #118 from ro80t/dependabot/cargo/regex-1.12.3 #279
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: Upload Release Assets | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| assets: | |
| name: Upload Assets (${{ matrix.target }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: aarch64-apple-darwin | |
| os: macos-15 | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-24.04 | |
| - target: x86_64-apple-darwin | |
| os: macos-15 | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-2022 | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Cache cargo registry | |
| if: contains(matrix.os, 'ubuntu') | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Checkout Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .node-version | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Checkout Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install tools | |
| run: | | |
| ./INSTALL | |
| cargo install cross --locked --force | |
| - name: Install target | |
| run: rustup target add ${{ matrix.target }} | |
| - name: Build | |
| run: cross build --target ${{ matrix.target }} --release --verbose --locked | |
| - name: Compress (for aarch64-unknown-linux-gnu) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| cd ./target/${{ matrix.target }}/release | |
| zip -r ./envl-${{ matrix.target }}.zip ./envl | |
| - name: Compress (in Ubuntu) | |
| if: contains(matrix.os, 'ubuntu') && matrix.target != 'aarch64-unknown-linux-gnu' | |
| run: | | |
| cd ./target/${{ matrix.target }}/release | |
| strip ./envl | |
| zip -r ./envl-${{ matrix.target }}.zip ./envl | |
| - name: Compress (in Mac) | |
| if: contains(matrix.os, 'macos') | |
| run: | | |
| strip -x -S ./target/${{ matrix.target }}/release/envl | |
| cd ./target/${{ matrix.target }}/release | |
| zip -r ./envl-${{ matrix.target }}.zip ./envl | |
| - name: Compress (in Windows) | |
| if: contains(matrix.os, 'windows') | |
| shell: pwsh | |
| run: | | |
| Compress-Archive -CompressionLevel Optimal -Force -Path ./target/${{ matrix.target }}/release/envl.exe -DestinationPath ./target/${{ matrix.target }}/release/envl-${{ matrix.target }}.zip | |
| - name: Upload | |
| if: github.ref_type == 'tag' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: ./target/${{ matrix.target }}/release/envl-${{ matrix.target }}.zip |