build(deps): bump actions/download-artifact from 6.0.0 to 7.0.0 #151
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: Release | |
| on: | |
| pull_request: | |
| paths: | |
| - .github/workflows/release.yml | |
| - justfile | |
| push: | |
| tags: | |
| - 'release/*' | |
| permissions: | |
| contents: write | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_NET_RETRY: 10 | |
| CHECKSEC_VERSION: 2.5.0 | |
| RUSTFLAGS: "-D warnings -A deprecated" | |
| RUSTUP_MAX_RETRIES: 10 | |
| jobs: | |
| meta: | |
| timeout-minutes: 5 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: meta | |
| shell: bash | |
| run: | | |
| shopt -s extglob | |
| ref="${{ github.ref }}" | |
| if [[ "$ref" == refs/tags/release/* ]]; then | |
| ver="${ref##refs/tags/release/}" | |
| if [[ "$ver" != v+([0-9]).+([0-9]).+([0-9])?(-+([a-z0-9-])) ]]; then | |
| echo "Invalid version: $ver" >&2 | |
| exit 1 | |
| fi | |
| echo "publish=true" >> "$GITHUB_OUTPUT" | |
| echo "version=$ver" >> "$GITHUB_OUTPUT" | |
| else | |
| sha="${{ github.sha }}" | |
| echo version="test-${sha:0:7}" >> "$GITHUB_OUTPUT" | |
| fi | |
| outputs: | |
| publish: ${{ steps.meta.outputs.publish }} | |
| version: ${{ steps.meta.outputs.version }} | |
| package: | |
| needs: [meta] | |
| strategy: | |
| matrix: | |
| arch: [amd64, arm64] | |
| os: [windows, linux] | |
| exclude: | |
| - os: windows | |
| arch: arm64 | |
| name: Package (${{ matrix.arch }}-${{ matrix.os }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| env: | |
| ARCH: ${{ matrix.arch }} | |
| OS: ${{ matrix.os }} | |
| PACKAGE_VERSION: ${{ needs.meta.outputs.version }} | |
| CARGO_RELEASE: "1" | |
| DEBIAN_FRONTEND: noninteractive | |
| container: docker://ghcr.io/linkerd/dev:v47-rust-musl | |
| steps: | |
| - name: Install MinGW | |
| if: matrix.os == 'windows' | |
| run: apt-get update && apt-get install mingw-w64 -y | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 | |
| - run: git config --global --add safe.directory "$PWD" # actions/runner#2033 | |
| - run: just release | |
| env: | |
| CARGO: "cargo auditable" | |
| - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 | |
| with: | |
| name: ${{ matrix.arch }}-${{ matrix.os }}-artifacts | |
| path: release/* | |
| publish: | |
| needs: [meta, package] | |
| name: GitHub Release | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 | |
| - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 | |
| with: | |
| path: artifacts | |
| - run: find artifacts -type f -ls | |
| - if: needs.meta.outputs.publish == 'true' | |
| uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| name: ${{ needs.meta.outputs.version }} | |
| files: artifacts/**/* | |
| generate_release_notes: true |