From 07b8ff25a7e18fe3ecff3b1b6f70c3b53b290605 Mon Sep 17 00:00:00 2001 From: Andy Hsu Date: Mon, 6 Mar 2023 17:55:05 +0800 Subject: [PATCH] ci: auto release desktop --- .github/workflows/auto_lang.yml | 2 +- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++- .github/workflows/release_docker.yml | 2 +- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto_lang.yml b/.github/workflows/auto_lang.yml index 868a40be..1c40ccc6 100644 --- a/.github/workflows/auto_lang.yml +++ b/.github/workflows/auto_lang.yml @@ -54,7 +54,7 @@ jobs: cd alist-web git add . git config --local user.email "i@nn.ci" - git config --local user.name "Noah Hsu" + git config --local user.name "Andy Hsu" git commit -m "chore: auto update i18n file" -a 2>/dev/null || : cd .. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ec1e1e4..60e18d1b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,4 +51,31 @@ jobs: - name: Release uses: softprops/action-gh-release@v1 with: - files: build/compress/* \ No newline at end of file + files: build/compress/* + + release_desktop: + needs: release + name: Release desktop + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + with: + repository: alist-org/desktop-release + ref: main + persist-credentials: false + fetch-depth: 0 + + - name: Add tag + run: | + git config --local user.email "i@nn.ci" + git config --local user.name "Andy Hsu" + version=$(wget -qO- -t1 -T2 "https://api.github.com/repos/alist-org/alist/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g') + git tag -a $version -m "release $version" + + - name: Push tags + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.MY_TOKEN }} + branch: main + repository: alist-org/desktop-release \ No newline at end of file diff --git a/.github/workflows/release_docker.yml b/.github/workflows/release_docker.yml index 2bcdd356..fb18460b 100644 --- a/.github/workflows/release_docker.yml +++ b/.github/workflows/release_docker.yml @@ -57,7 +57,7 @@ jobs: - name: Add tag run: | git config --local user.email "i@nn.ci" - git config --local user.name "Noah Hsu" + git config --local user.name "Andy Hsu" git tag -a ${{ github.ref_name }} -m "release ${{ github.ref_name }}" - name: Push tags