feat: 修改ci

This commit is contained in:
姚彪
2023-12-17 23:38:52 +08:00
parent 2c7567701d
commit 575069ea6f

View File

@@ -1,5 +1,8 @@
name: Build
permissions:
contents: write
on:
push:
branches:
@@ -60,12 +63,15 @@ jobs:
- kind: AppImage
cpu: x64
package-tail: .x86_64
package-head: DownKyi-
- kind: deb
cpu: x64
package-tail: .x86_64
package-tail: _amd64
package-head: DownKyi_
- kind: rpm
cpu: x64
package-tail: .x86_64
package-head: DownKyi_
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -98,14 +104,18 @@ jobs:
- name: Upload build artifacts ${{ matrix.kind }}
uses: actions/upload-artifact@v3
with:
name: DownKyi-${{ steps.version.outputs.content }}-1.${{ matrix.package-tail }}.${{ matrix.kind }}
path: script/pupnet/output/DownKyi-${{ steps.version.outputs.content }}-1.${{ matrix.package-tail }}.${{ matrix.kind }}
name: ${{ matrix.package-head }}${{ steps.version.outputs.content }}_linux_${{ matrix.package-tail }}.${{ matrix.kind }}
path: script/pupnet/output/${{ matrix.package-head }}${{ steps.version.outputs.content }}-1${{ matrix.package-tail }}.${{ matrix.kind }}
- name: Change Name
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: mv "${{ matrix.package-head }}${{ steps.version.outputs.content }}-1${{ matrix.package-tail }}.${{ matrix.kind }}" "${{ matrix.package-head }}${{ steps.version.outputs.content }}_linux_${{ matrix.package-tail }}.${{ matrix.kind }}"
working-directory: ./script/pupnet/output/
- name: Release
uses: ncipollo/release-action@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
allowUpdates: true
artifacts: script/pupnet/output/DownKyi-${{ steps.version.outputs.content }}-1.${{ matrix.package-tail }}.${{ matrix.kind }}
artifacts: script/pupnet/output/${{ matrix.package-head }}${{ steps.version.outputs.content }}_linux_${{ matrix.package-tail }}.${{ matrix.kind }}
build-macos:
runs-on: macos-latest
strategy: