Merge pull request #96 from luoqiz/feat-update-spy39.5.2 #47
Workflow file for this run
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| tags: ["v[0-9]+.[0-9]+.[0-9]+*"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| actions: write | |
| jobs: | |
| build: | |
| uses: ./.github/workflows/build-ci.yml | |
| release: | |
| name: Publish Release | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Determine Release Info | |
| env: | |
| GITHUB_REF: ${{ github.ref }} | |
| run: | | |
| VERSION=${GITHUB_REF##*/} | |
| MAJOR=${VERSION%%.*} | |
| MINOR=${VERSION%.*} | |
| MINOR=${MINOR#*.} | |
| PATCH=${VERSION##*.} | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "WINDOWS_DIR=WeChatFerry_${MAJOR}.${MINOR}.${PATCH}_windows_x64" >> $GITHUB_ENV | |
| echo "INNER_DIR=WeChatFerry-$VERSION" >> $GITHUB_ENV | |
| - name: Create Windows Directory | |
| run: mkdir -p ${{ env.WINDOWS_DIR }} | |
| - name: Download Windows artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: windows | |
| path: ${{ env.WINDOWS_DIR }} | |
| - name: Create Windows Archive | |
| run: zip -r ${{ env.WINDOWS_DIR }}.zip ${{ env.WINDOWS_DIR }} | |
| - name: Publish to GitHub Releases | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} # 使用内置 GITHUB_TOKEN | |
| files: ${{ env.WINDOWS_DIR }}.zip |