Skip to content

Commit

Permalink
👷 ci(release): 修复 Win 和 MacOS 系统的 tailwindcss 下载链接问题
Browse files Browse the repository at this point in the history
  • Loading branch information
13m0n4de committed Oct 22, 2024
1 parent 1466d00 commit 6dba79b
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ jobs:
fail-fast: false
matrix:
job:
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , use-cross: false , extension: "" }
- { os: ubuntu-latest , target: x86_64-unknown-linux-musl , use-cross: true , extension: "" }
- { os: ubuntu-latest , target: armv7-unknown-linux-gnueabihf , use-cross: true , extension: "" }
- { os: ubuntu-latest , target: armv7-unknown-linux-musleabihf , use-cross: true , extension: "" }
- { os: ubuntu-latest , target: aarch64-unknown-linux-gnu , use-cross: true , extension: "" }
- { os: ubuntu-latest , target: aarch64-unknown-linux-musl , use-cross: true , extension: "" }
- { os: macos-latest , target: x86_64-apple-darwin , use-cross: false , extension: "" }
- { os: macos-latest , target: aarch64-apple-darwin , use-cross: false , extension: "" }
- { os: windows-latest , target: x86_64-pc-windows-msvc , use-cross: false , extension: .exe }
- { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , use-cross: false , extension: "" , tailwind-platform: linux-x64 }
- { os: ubuntu-latest , target: x86_64-unknown-linux-musl , use-cross: true , extension: "" , tailwind-platform: linux-x64 }
- { os: ubuntu-latest , target: armv7-unknown-linux-gnueabihf , use-cross: true , extension: "" , tailwind-platform: linux-x64 }
- { os: ubuntu-latest , target: armv7-unknown-linux-musleabihf , use-cross: true , extension: "" , tailwind-platform: linux-x64 }
- { os: ubuntu-latest , target: aarch64-unknown-linux-gnu , use-cross: true , extension: "" , tailwind-platform: linux-x64 }
- { os: ubuntu-latest , target: aarch64-unknown-linux-musl , use-cross: true , extension: "" , tailwind-platform: linux-x64 }
- { os: macos-latest , target: x86_64-apple-darwin , use-cross: false , extension: "" , tailwind-platform: macos-x64 }
- { os: macos-latest , target: aarch64-apple-darwin , use-cross: false , extension: "" , tailwind-platform: macos-arm64 }
- { os: windows-latest , target: x86_64-pc-windows-msvc , use-cross: false , extension: .exe , tailwind-platform: windows-x64 }

steps:
- name: Checkout
uses: actions/checkout@master
Expand All @@ -40,10 +41,20 @@ jobs:
run: cargo binstall -y trunk

- name: Install TailwindCSS
shell: bash
run: |
wget -q https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64 -O tailwindcss
chmod +x tailwindcss
mv tailwindcss /usr/local/bin/
if [ "${{ matrix.job.os }}" = "windows-latest" ]; then
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-${{ matrix.job.tailwind-platform }}.exe
mv tailwindcss-${{ matrix.job.tailwind-platform }}.exe tailwindcss.exe
chmod +x tailwindcss.exe
else
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-${{ matrix.job.tailwind-platform }}
mv tailwindcss-${{ matrix.job.tailwind-platform }} tailwindcss
chmod +x tailwindcss
fi
mkdir -p ~/.local/bin
mv tailwindcss* ~/.local/bin/
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Build frontend
run: |
Expand Down

0 comments on commit 6dba79b

Please sign in to comment.