From 6b249a8740441d29e0cb4c5aadbad75883198833 Mon Sep 17 00:00:00 2001 From: FangWei <1970446279@qq.com> Date: Thu, 13 Apr 2023 01:00:08 +0800 Subject: [PATCH 1/2] Create gthub actions --- .github/workflows/qqwry.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/qqwry.yml diff --git a/.github/workflows/qqwry.yml b/.github/workflows/qqwry.yml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/workflows/qqwry.yml @@ -0,0 +1 @@ + From 98c4d77d7c4683660ec0ba5ab255972cd00423e9 Mon Sep 17 00:00:00 2001 From: FangWei <1970446279@qq.com> Date: Thu, 13 Apr 2023 01:01:11 +0800 Subject: [PATCH 2/2] Update qqwry.yml --- .github/workflows/qqwry.yml | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.github/workflows/qqwry.yml b/.github/workflows/qqwry.yml index 8b13789..a9be459 100644 --- a/.github/workflows/qqwry.yml +++ b/.github/workflows/qqwry.yml @@ -1 +1,57 @@ +name: qqwry +on: + push: + branches: + - master +env: + innoextract_version: 1.9 + arch: amd64 +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install requests + pip install bs4 + + - name: Get download link from WeChat tweet + run: | + echo "::set-output name=link::$(python qqwry.py)" + + - name: Use link to download newest Zip + run: | + link=${{ steps.get_link.outputs.link }} + mkdir -p Downloads + cd Downloads + wget $link + + - name: Download innoextract + run: | + wget https://github.com/dscharrer/innoextract/releases/download/${{ env.innoextract_version }}/innoextract-${{ env.innoextract_version }}-linux.tar.xz + tar -xvf innoextract-${{ env.innoextract_version }}-linux.tar.xz innoextract-${{ env.innoextract_version }}-linux/bin/${{ env.arch }}/innoextract --strip-components 3 + + - name: Get qqwry.dat + id: dat_date + shell: pwsh + run: | + $zip = (Get-ChildItem Downloads\*.zip)[0].FullName + $filename = (Get-ChildItem Downloads\*.zip)[0].Name + $name = $filename.Substring($filename.IndexOf('-') + 1 , $filename.length - $filename.IndexOf('-') - 5) + Write-Output "::set-output name=dat_date::$name" + 7z e -y $zip setup.exe + ./innoextract setup.exe -I qqwry.dat + + - name: Create Release + uses: ncipollo/release-action@v1 + with: + commit: ${{ env.GITHUB_SHA }} + tag: ${{ steps.dat_date.outputs.dat_date }} + token: ${{ secrets.GITHUB_TOKEN }} + artifacts: app/qqwry.dat + body: ${{ steps.dat_date.outputs.dat_date }}