Skip to content

Commit

Permalink
[CI] upload release file
Browse files Browse the repository at this point in the history
  • Loading branch information
fy0 committed Mar 22, 2024
1 parent 1c0f7bf commit 10f947c
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/Lagrange.OneBot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
linux-arm64,
osx-x64,
osx-arm64,
linux-musl-x64,
linux-musl-arm,
linux-musl-arm64,
]

steps:
Expand All @@ -45,6 +42,27 @@ jobs:
- name: Compress files
run: Compress-Archive -Path 'Lagrange.OneBot\bin\Release\net8.0\${{ matrix.runtimeIdentifier }}\publish' -DestinationPath 'Lagrange.OneBot_${{ matrix.runtimeIdentifier }}_8.0.zip'

- name: dir
run: dir 'Lagrange.OneBot\bin\Release\net8.0\${{ matrix.runtimeIdentifier }}\publish\'

- name: Rename
if: matrix.runtimeIdentifier == 'win-x64' || matrix.runtimeIdentifier == 'win-x86'
run: move 'Lagrange.OneBot\bin\Release\net8.0\${{ matrix.runtimeIdentifier }}\publish\Lagrange.OneBot.exe' 'Lagrange.OneBot\bin\Release\net8.0\${{ matrix.runtimeIdentifier }}\publish\Lagrange.OneBot_${{ matrix.runtimeIdentifier }}.exe'

- name: Rename
if: matrix.runtimeIdentifier != 'win-x64' && matrix.runtimeIdentifier != 'win-x86'
run: move 'Lagrange.OneBot\bin\Release\net8.0\${{ matrix.runtimeIdentifier }}\publish\Lagrange.OneBot' 'Lagrange.OneBot\bin\Release\net8.0\${{ matrix.runtimeIdentifier }}\publish\Lagrange.OneBot_${{ matrix.runtimeIdentifier }}'

- uses: fy0/r2-upload-action@latest
continue-on-error: true
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: Lagrange.OneBot/bin/Release/net8.0/${{ matrix.runtimeIdentifier }}/publish/
destination-dir: ./lagrange/

- name: Prepare release files
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 10f947c

Please sign in to comment.