Build Alist #8
This file contains 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: Build Alist | |
on: workflow_dispatch | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Build Alist | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup FreeBSD base | |
run: | | |
wget -q https://download.freebsd.org/releases/amd64/14.1-RELEASE/base.txz | |
sudo mkdir /opt/freebsd && sudo tar -xf ./base.txz -C /opt/freebsd | |
- name: Build Alist | |
run: | | |
export LATEST_APP=$(wget -qO- https://api.github.com/repos/alist-org/alist/tags | gawk -F '["v]' '/name/{print "v"$5;exit}') | |
git clone -b $LATEST_APP https://github.com/alist-org/alist | |
cd alist/public && wget https://github.com/alist-org/alist-web/releases/latest/download/dist.tar.gz && tar xzf dist.tar.gz && rm dist.tar.gz | |
cd .. && bash ../build.sh | |
- name: Upload artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: alist-freebsd | |
path: | | |
alist/alist | |
- name: Generate release tag | |
id: tag | |
run: echo "release_tag=$(wget -qO- https://api.github.com/repos/alist-org/alist/tags | gawk -F '["v]' '/name/{print "v"$5;exit}')" >> $GITHUB_OUTPUT | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ steps.tag.outputs.release_tag }} | |
files: | | |
alist/alist | |
- name: Delete workflow runs | |
uses: Mattraks/delete-workflow-runs@v2 | |
with: | |
token: ${{ github.token }} | |
repository: ${{ github.repository }} | |
retain_days: 1 | |
keep_minimum_runs: 8 |