mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-25 09:34:17 +02:00
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/download-artifact/releases">actions/download-artifact's releases</a>.</em></p> <blockquote> <h2>v8.0.0</h2> <h2>v8 - What's new</h2> <h3>Direct downloads</h3> <p>To support direct uploads in <code>actions/upload-artifact</code>, the action will no longer attempt to unzip all downloaded files. Instead, the action checks the <code>Content-Type</code> header ahead of unzipping and skips non-zipped files. Callers wishing to download a zipped file as-is can also set the new <code>skip-decompress</code> parameter to <code>false</code>.</p> <h3>Enforced checks (breaking)</h3> <p>A previous release introduced digest checks on the download. If a download hash didn't match the expected hash from the server, the action would log a warning. Callers can now configure the behavior on mismatch with the <code>digest-mismatch</code> parameter. To be secure by default, we are now defaulting the behavior to <code>error</code> which will fail the workflow run.</p> <h3>ESM</h3> <p>To support new versions of the @actions/* packages, we've upgraded the package to ESM.</p> <h2>What's Changed</h2> <ul> <li>Don't attempt to un-zip non-zipped downloads by <a href="https://github.com/danwkennedy"><code>@danwkennedy</code></a> in <a href="https://redirect.github.com/actions/download-artifact/pull/460">actions/download-artifact#460</a></li> <li>Add a setting to specify what to do on hash mismatch and default it to <code>error</code> by <a href="https://github.com/danwkennedy"><code>@danwkennedy</code></a> in <a href="https://redirect.github.com/actions/download-artifact/pull/461">actions/download-artifact#461</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/download-artifact/compare/v7...v8.0.0">https://github.com/actions/download-artifact/compare/v7...v8.0.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="70fc10c6e5"><code>70fc10c</code></a> Merge pull request <a href="https://redirect.github.com/actions/download-artifact/issues/461">#461</a> from actions/danwkennedy/digest-mismatch-behavior</li> <li><a href="f258da9a50"><code>f258da9</code></a> Add change docs</li> <li><a href="ccc058e5fb"><code>ccc058e</code></a> Fix linting issues</li> <li><a href="bd7976ba57"><code>bd7976b</code></a> Add a setting to specify what to do on hash mismatch and default it to <code>error</code></li> <li><a href="ac21fcf45e"><code>ac21fcf</code></a> Merge pull request <a href="https://redirect.github.com/actions/download-artifact/issues/460">#460</a> from actions/danwkennedy/download-no-unzip</li> <li><a href="15999bff51"><code>15999bf</code></a> Add note about package bumps</li> <li><a href="974686ed50"><code>974686e</code></a> Bump the version to <code>v8</code> and add release notes</li> <li><a href="fbe48b1d27"><code>fbe48b1</code></a> Update test names to make it clearer what they do</li> <li><a href="96bf374a61"><code>96bf374</code></a> One more test fix</li> <li><a href="b8c4819ef5"><code>b8c4819</code></a> Fix skip decompress test</li> <li>Additional commits viewable in <a href="https://github.com/actions/download-artifact/compare/v7...v8">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
160 lines
5.8 KiB
YAML
160 lines
5.8 KiB
YAML
name: Release
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*" # push events to matching v*, i.e. v1.0, v20.15.10
|
|
|
|
jobs:
|
|
create-release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Create release for tag
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: |
|
|
source ./scripts/upload-asset.sh
|
|
# Create: <token> <repo> <tag>
|
|
create_release ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} "Tealdeer version ${GITHUB_REF#refs/*/v}.\n\nFor the full changelog, see https://github.com/tealdeer-rs/tealdeer/blob/main/CHANGELOG.md.\n\nBinaries were generated automatically in CI, and are therefore unsigned. For a fully trusted release, please build from source."
|
|
|
|
upload-completions:
|
|
needs:
|
|
- create-release
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
target: ["bash", "fish", "zsh"]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Upload completion
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: |
|
|
source ./scripts/upload-asset.sh
|
|
# Upload: <token> <repo> <tag> <file> <name>
|
|
upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} completion/${{ matrix.target }}_tealdeer completions_${{ matrix.target }}
|
|
|
|
upload-license:
|
|
needs:
|
|
- create-release
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
target: ["MIT", "APACHE"]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Upload license
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: |
|
|
source ./scripts/upload-asset.sh
|
|
# Upload: <token> <repo> <tag> <file> <name>
|
|
upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} LICENSE-${{ matrix.target }} LICENSE-${{ matrix.target }}.txt
|
|
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- arch: "x86_64"
|
|
libc: "musl"
|
|
- arch: "aarch64"
|
|
libc: "musl"
|
|
- arch: "i686"
|
|
libc: "musl"
|
|
- arch: "armv7"
|
|
libc: "musleabihf"
|
|
- arch: "arm"
|
|
libc: "musleabi"
|
|
- arch: "arm"
|
|
libc: "musleabihf"
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Pull Docker image
|
|
run: docker pull messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }}
|
|
- name: Build in Docker
|
|
run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} cargo build --release
|
|
- name: Strip binary
|
|
run: docker run --rm -i -v "$(pwd)":/home/rust/src messense/rust-musl-cross:${{ matrix.arch }}-${{ matrix.libc }} musl-strip -s /home/rust/src/target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr
|
|
- uses: actions/upload-artifact@v7
|
|
with:
|
|
name: "tealdeer-linux-${{ matrix.arch }}-${{ matrix.libc }}"
|
|
path: "target/${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}/release/tldr"
|
|
|
|
build-macos:
|
|
runs-on: macos-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- arch: "x86_64"
|
|
- arch: "aarch64"
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Setup toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: stable
|
|
targets: "${{ matrix.arch }}-apple-darwin"
|
|
- name: Build
|
|
run: cargo build --release --target ${{ matrix.arch }}-apple-darwin
|
|
- uses: actions/upload-artifact@v7
|
|
with:
|
|
name: "tealdeer-macos-${{ matrix.arch }}"
|
|
path: "target/${{ matrix.arch }}-apple-darwin/release/tldr"
|
|
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Setup toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: stable
|
|
- name: Build
|
|
run: cargo build --release --target x86_64-pc-windows-msvc
|
|
- uses: actions/upload-artifact@v7
|
|
with:
|
|
name: "tealdeer-windows-x86_64-msvc"
|
|
path: "target/x86_64-pc-windows-msvc/release/tldr.exe"
|
|
|
|
upload-release:
|
|
needs:
|
|
- create-release
|
|
- build-linux
|
|
- build-macos
|
|
- build-windows
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
target:
|
|
- linux-x86_64-musl
|
|
- linux-aarch64-musl
|
|
- linux-i686-musl
|
|
- linux-armv7-musleabihf
|
|
- linux-arm-musleabi
|
|
- linux-arm-musleabihf
|
|
- macos-x86_64
|
|
- macos-aarch64
|
|
- windows-x86_64-msvc
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/download-artifact@v8
|
|
- name: Upload binary
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: |
|
|
source ./scripts/upload-asset.sh
|
|
|
|
# Move/rename file
|
|
mkdir out && cd out
|
|
if [[ "${{ matrix.target }}" == *windows* ]]; then
|
|
src="../tealdeer-${{ matrix.target }}/tldr.exe"
|
|
filename="tealdeer-${{ matrix.target }}.exe"
|
|
else
|
|
src="../tealdeer-${{ matrix.target }}/tldr"
|
|
filename="tealdeer-${{ matrix.target }}"
|
|
fi
|
|
cp $src $filename
|
|
|
|
# Create checksum
|
|
sha256sum "$filename" > "$filename.sha256"
|
|
|
|
# Upload: <token> <repo> <tag> <file> <name>
|
|
upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} $filename $filename
|
|
upload_release_file ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${GITHUB_REF#refs/*/} $filename.sha256 $filename.sha256
|