Skip to main content
File
name: Release
on: push: tags: - 'v*' workflow_dispatch:
jobs: release-windows: name: Relase windows strategy: matrix: target: [ "x86_64-pc-windows-gnu" ] toolchain: [stable] runs-on: windows-2022 steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - uses: Swatinem/rust-cache@v1 with: key: ${{ matrix.target }} - name: Setup Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.toolchain }} profile: minimal override: true - name: Build run: | cargo build --release --target x86_64-pc-windows-gnu - name: Create release uses: ncipollo/release-action@v1 with: omitBody: true artifacts: 'target/x86_64-pc-windows-gnu/release/deno_clippy.dll' token: ${{ secrets.GITHUB_TOKEN }}
release-unix: name: Release unix strategy: matrix: target: [ "x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "aarch64-apple-darwin" ] toolchain: [stable] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - uses: Swatinem/rust-cache@v1 with: key: ${{ matrix.target }} - name: Setup Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.toolchain }} profile: minimal override: true - name: Install zig uses: goto-bus-stop/setup-zig@v1 with: version: 0.9.1 - name: Install cargo-zigbuild run: | cargo install cargo-zigbuild - name: Build run: | cargo zigbuild --release --target ${{ matrix.target }} - name: Make dist run: | mkdir dist - name: Copy dist ${{ matrix.target }} if: ${{ matrix.target == 'x86_64-apple-darwin' }} run: | mv target/${{ matrix.target }}/release/libdeno_clippy.dylib dist/libdeno_clippy.dylib - name: Copy dist ${{ matrix.target }} if: ${{ matrix.target == 'aarch64-apple-darwin' }} run: | mv target/${{ matrix.target }}/release/libdeno_clippy.dylib dist/libdeno_clippy_arm64.dylib - name: Copy dist ${{ matrix.target }} if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }} run: | mv target/${{ matrix.target }}/release/libdeno_clippy.so diet/libdeno_clippy.so - name: Create release uses: ncipollo/release-action@v1 with: omitBody: true artifacts: 'dist/*' token: ${{ secrets.GITHUB_TOKEN }}