name: build on: push: branches: - "main" env: CARGO_TERM_COLOR: always OUT_DIR: ./output jobs: publish: name: publish # needs: # - release strategy: fail-fast: true matrix: include: - target: windows-2022 suffix: windows-x86_64 platform: windows-latest archive: zip name: x86_64-pc-windows-msvc - target: x86_64-unknown-linux-gnu suffix: linux-x86_64 platform: ubuntu-latest archive: tar.gz name: x86_64-unknown-linux-gnu runs-on: ${{ matrix.platform }} steps: - name: Dump git[hub|ea] context run: | echo "$env:GITHUB_CONTEXT" echo "$env:GITEA_CONTEXT" env: GITHUB_CONTEXT: ${{ toJson(github) }} GITEA_CONTEXT: ${{ toJson(gitea) }} # - name: Ensure rust is up to date # run: | # rustup update # rustup toolchain install nightly # - uses: actions/checkout@v4 # - name: Create output directory # run: mkdir -f output # - name: Build release # run: cargo +nightly -Z unstable-options b -r --artifact-dir ./output # - name: Collect windows artifacts # if: matrix.platform != 'windows-2022' # shell: powershell # run: | # cp -r -fo assets $env:GITHUB_WORKSPACE/$env:OUT_DIR/ # Compress-Archive -Path $env:GITHUB_WORKSPACE/$env:OUT_DIR/* -DestinationPath $env:GITHUB_WORKSPACE/mosquitoswatter_${{ matrix.name }}.${{ matrix.archive }} # - name: Upload artifacts # uses: ncipollo/release-action@v1 # with: # allowUpdates: true # artifacts: "mosquitoswatter_${{ matrix.name }}.${{ matrix.archive }}"