chore: Release 3.6.0 #40
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: Release | |
| on: | |
| push: | |
| tags: | |
| - v[0-9]+.* | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1 | |
| CARGO_PROFILE_RELEASE_LTO: true | |
| CARGO_PROFILE_RELEASE_OPT_LEVEL: "s" | |
| CARGO_TERM_COLOR: always | |
| CHEZMOI_MODIFY_MANAGER_BUILDER: github-release | |
| RUST_BACKTRACE: 1 | |
| RUSTFLAGS: "-D warnings" | |
| RUSTUP_MAX_RETRIES: 10 | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: taiki-e/create-gh-release-action@26b80501670402f1999aff4b934e1574ef2d3705 # v1.9.1 | |
| with: | |
| draft: true | |
| # (Required) GitHub token for creating GitHub Releases. | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| cargo-about: | |
| needs: create-release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Rust | |
| run: rustup update stable && rustup default stable && rustup component add clippy | |
| - name: Get cargo-binstall | |
| run: | | |
| curl -L https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz | tar -zxf - && mv cargo-binstall $HOME/.cargo/bin/ | |
| - name: Install required cargo addons | |
| run: cargo binstall --no-confirm --no-symlinks cargo-about | |
| - run: mkdir target && cargo about generate about.hbs > target/licenses.html | |
| - name: Upload licenses.html | |
| run: GITHUB_TOKEN="${token}" gh release upload "${tag#refs/tags/}" target/licenses.html | |
| env: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ github.ref }} | |
| upload-assets: | |
| needs: create-release | |
| permissions: | |
| attestations: write | |
| contents: write | |
| id-token: write # Needed for attestations | |
| strategy: | |
| matrix: | |
| include: | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| rustflags: -Clink-arg=-Wl,--compress-debug-sections=zlib | |
| - target: aarch64-unknown-linux-musl | |
| os: ubuntu-latest | |
| rustflags: -Clink-arg=-Wl,--compress-debug-sections=zlib | |
| - target: armv7-unknown-linux-gnueabihf | |
| os: ubuntu-latest | |
| rustflags: -Clink-arg=-Wl,--compress-debug-sections=zlib | |
| - target: armv7-unknown-linux-musleabihf | |
| os: ubuntu-latest | |
| rustflags: -Clink-arg=-Wl,--compress-debug-sections=zlib | |
| - target: i686-unknown-linux-gnu | |
| os: ubuntu-latest | |
| rustflags: -Clink-arg=-Wl,--compress-debug-sections=zlib | |
| - target: i686-unknown-linux-musl | |
| os: ubuntu-latest | |
| rustflags: -Clink-arg=-Wl,--compress-debug-sections=zlib | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| rustflags: -Clink-arg=-Wl,--compress-debug-sections=zlib | |
| - target: x86_64-unknown-linux-musl | |
| os: ubuntu-latest | |
| rustflags: -Clink-arg=-Wl,--compress-debug-sections=zlib | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| rustflags: | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| rustflags: | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| rustflags: | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: taiki-e/upload-rust-binary-action@3962470d6e7f1993108411bc3f75a135ec67fc8c # v1.27.0 | |
| id: upload-rust-binary-action | |
| with: | |
| # (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload. | |
| # Note that glob pattern is not supported yet. | |
| bin: chezmoi_modify_manager | |
| # (optional) Target triple, default is host triple. | |
| target: ${{ matrix.target }} | |
| # Include version number. | |
| archive: $bin-$tag-$target | |
| # (required) GitHub token for uploading assets to GitHub Releases. | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| env: | |
| RUSTFLAGS: ${{ matrix.rustflags }} | |
| - name: Generate artifact attestation | |
| uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 | |
| with: | |
| subject-path: "${{ steps.upload-rust-binary-action.outputs.archive }}.*" | |
| upload-crates-io: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - run: cargo publish --token ${CRATES_TOKEN} | |
| env: | |
| CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} | |
| upload-aur: | |
| needs: | |
| - upload-crates-io | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Get AUR repo | |
| run: git clone https://aur.archlinux.org/chezmoi_modify_manager.git aur | |
| - name: Update PKGBUILD | |
| run: .ci/upd-pkgbuild.sh "${RELEASE_TAG}" aur/PKGBUILD | |
| env: | |
| RELEASE_TAG: ${{ github.ref }} | |
| - name: Publish AUR package | |
| uses: KSXGitHub/github-actions-deploy-aur@2ac5a4c1d7035885d46b10e3193393be8460b6f1 # v4.1.1 | |
| with: | |
| pkgname: chezmoi_modify_manager | |
| pkgbuild: aur/PKGBUILD | |
| updpkgsums: true | |
| commit_username: ${{ secrets.AUR_USERNAME }} | |
| commit_email: ${{ secrets.AUR_EMAIL }} | |
| ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | |
| commit_message: New upstream release (automatic update from GitHub Actions) |