更新流水线文件名规则 (#541)

This commit is contained in:
nilaoda 2024-12-02 01:27:26 +08:00 committed by GitHub
parent 4c4617b780
commit e350ab7233
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 36 additions and 23 deletions

View File

@ -27,10 +27,23 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
date: ${{ steps.get_date.outputs.date }} date: ${{ steps.get_date.outputs.date }}
tag: ${{ steps.format_tag.outputs.tag }}
steps: steps:
- name: Get Date in UTC+8 - name: Get Date in UTC+8
id: get_date id: get_date
run: echo "date=$(date -u -d '8 hours' +'%Y%m%d')" >> "$GITHUB_OUTPUT" run: |
DATE=$(date -u -d '8 hours' +'%Y%m%d')
echo "date=${DATE}" >> "$GITHUB_OUTPUT"
- name: Determine Tag
id: format_tag
run: |
if [ "${{ github.event.inputs.doRelease }}" == "true" ]; then
TAG="${{ github.event.inputs.tag }}"
else
TAG="actions-$GITHUB_RUN_ID"
fi
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
build-win-nt6_0-x86: build-win-nt6_0-x86:
runs-on: windows-latest runs-on: windows-latest
@ -55,13 +68,13 @@ jobs:
- name: Package [win-x86] - name: Package [win-x86]
run: | run: |
cd artifact-x86 cd artifact-x86
zip ../N_m3u8DL-RE_${{ github.event.inputs.tag }}_win-NT6.0-x86_${{ needs.set-date.outputs.date }}.zip N_m3u8DL-RE.exe zip ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_win-NT6.0-x86_${{ needs.set-date.outputs.date }}.zip N_m3u8DL-RE.exe
- name: Upload Artifact[win-x86] - name: Upload Artifact[win-x86]
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@v3.1.3
with: with:
name: win-NT6.0-x86 name: win-NT6.0-x86
path: N_m3u8DL-RE_${{ github.event.inputs.tag }}_win-NT6.0-x86_${{ needs.set-date.outputs.date }}.zip path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_win-NT6.0-x86_${{ needs.set-date.outputs.date }}.zip
build-win-x64-arm64: build-win-x64-arm64:
runs-on: windows-latest runs-on: windows-latest
@ -84,21 +97,21 @@ jobs:
- name: Package [win] - name: Package [win]
run: | run: |
cd artifact-x64 cd artifact-x64
zip ../N_m3u8DL-RE_${{ github.event.inputs.tag }}_win-x64_${{ needs.set-date.outputs.date }}.zip N_m3u8DL-RE.exe zip ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_win-x64_${{ needs.set-date.outputs.date }}.zip N_m3u8DL-RE.exe
cd ../artifact-arm64 cd ../artifact-arm64
zip ../N_m3u8DL-RE_${{ github.event.inputs.tag }}_win-arm64_${{ needs.set-date.outputs.date }}.zip N_m3u8DL-RE.exe zip ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_win-arm64_${{ needs.set-date.outputs.date }}.zip N_m3u8DL-RE.exe
- name: Upload Artifact [win-x64] - name: Upload Artifact [win-x64]
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@v3.1.3
with: with:
name: win-x64 name: win-x64
path: N_m3u8DL-RE_${{ github.event.inputs.tag }}_win-x64_${{ needs.set-date.outputs.date }}.zip path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_win-x64_${{ needs.set-date.outputs.date }}.zip
- name: Upload Artifact [win-arm64] - name: Upload Artifact [win-arm64]
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@v3.1.3
with: with:
name: win-arm64 name: win-arm64
path: N_m3u8DL-RE_${{ github.event.inputs.tag }}_win-arm64_${{ needs.set-date.outputs.date }}.zip path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_win-arm64_${{ needs.set-date.outputs.date }}.zip
build-linux-x64-arm64: build-linux-x64-arm64:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -130,21 +143,21 @@ jobs:
- name: Package [linux] - name: Package [linux]
run: | run: |
cd artifact cd artifact
tar -czvf ../N_m3u8DL-RE_${{ github.event.inputs.tag }}_linux-x64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_linux-x64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE
cd ../artifact-arm64 cd ../artifact-arm64
tar -czvf ../N_m3u8DL-RE_${{ github.event.inputs.tag }}_linux-arm64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_linux-arm64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE
- name: Upload Artifact [linux-x64] - name: Upload Artifact [linux-x64]
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@v3.1.3
with: with:
name: linux-x64 name: linux-x64
path: N_m3u8DL-RE_${{ github.event.inputs.tag }}_linux-x64_${{ needs.set-date.outputs.date }}.tar.gz path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_linux-x64_${{ needs.set-date.outputs.date }}.tar.gz
- name: Upload Artifact[linux-arm64] - name: Upload Artifact[linux-arm64]
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@v3.1.3
with: with:
name: linux-arm64 name: linux-arm64
path: N_m3u8DL-RE_${{ github.event.inputs.tag }}_linux-arm64_${{ needs.set-date.outputs.date }}.tar.gz path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_linux-arm64_${{ needs.set-date.outputs.date }}.tar.gz
build-android-bionic-x64-arm64: build-android-bionic-x64-arm64:
runs-on: windows-latest runs-on: windows-latest
@ -175,21 +188,21 @@ jobs:
- name: Package [linux-bionic] - name: Package [linux-bionic]
run: | run: |
cd artifact cd artifact
tar -czvf ../N_m3u8DL-RE_${{ github.event.inputs.tag }}_android-bionic-x64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_android-bionic-x64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE
cd ../artifact-arm64 cd ../artifact-arm64
tar -czvf ../N_m3u8DL-RE_${{ github.event.inputs.tag }}_android-bionic-arm64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_android-bionic-arm64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE
- name: Upload Artifact [linux-bionic-x64] - name: Upload Artifact [linux-bionic-x64]
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@v3.1.3
with: with:
name: android-bionic-x64 name: android-bionic-x64
path: N_m3u8DL-RE_${{ github.event.inputs.tag }}_android-bionic-x64_${{ needs.set-date.outputs.date }}.tar.gz path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_android-bionic-x64_${{ needs.set-date.outputs.date }}.tar.gz
- name: Upload Artifact[linux-bionic-arm64] - name: Upload Artifact[linux-bionic-arm64]
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@v3.1.3
with: with:
name: android-bionic-arm64 name: android-bionic-arm64
path: N_m3u8DL-RE_${{ github.event.inputs.tag }}_android-bionic-arm64_${{ needs.set-date.outputs.date }}.tar.gz path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_android-bionic-arm64_${{ needs.set-date.outputs.date }}.tar.gz
build-linux-musl-x64: build-linux-musl-x64:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -205,13 +218,13 @@ jobs:
- name: Package [linux-musl-x64] - name: Package [linux-musl-x64]
run: | run: |
cd artifact cd artifact
tar -czvf ../N_m3u8DL-RE_${{ github.event.inputs.tag }}_linux-musl-x64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_linux-musl-x64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE
- name: Upload Artifact [linux-musl-x64] - name: Upload Artifact [linux-musl-x64]
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@v3.1.3
with: with:
name: linux-musl-x64 name: linux-musl-x64
path: N_m3u8DL-RE_${{ github.event.inputs.tag }}_linux-musl-x64_${{ needs.set-date.outputs.date }}.tar.gz path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_linux-musl-x64_${{ needs.set-date.outputs.date }}.tar.gz
build-linux-musl-arm64: build-linux-musl-arm64:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -233,13 +246,13 @@ jobs:
- name: Package [linux-musl-arm64] - name: Package [linux-musl-arm64]
run: | run: |
cd artifact cd artifact
tar -czvf ../N_m3u8DL-RE_${{ github.event.inputs.tag }}_linux-musl-arm64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_linux-musl-arm64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE
- name: Upload Artifact [linux-musl-arm64] - name: Upload Artifact [linux-musl-arm64]
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@v3.1.3
with: with:
name: linux-musl-arm64 name: linux-musl-arm64
path: N_m3u8DL-RE_${{ github.event.inputs.tag }}_linux-musl-arm64_${{ needs.set-date.outputs.date }}.tar.gz path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_linux-musl-arm64_${{ needs.set-date.outputs.date }}.tar.gz
build-mac-x64-arm64: build-mac-x64-arm64:
runs-on: macos-latest runs-on: macos-latest
@ -258,21 +271,21 @@ jobs:
- name: Package [osx] - name: Package [osx]
run: | run: |
cd artifact-x64 cd artifact-x64
tar -czvf ../N_m3u8DL-RE_${{ github.event.inputs.tag }}_osx-x64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_osx-x64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE
cd ../artifact-arm64 cd ../artifact-arm64
tar -czvf ../N_m3u8DL-RE_${{ github.event.inputs.tag }}_osx-arm64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE tar -czvf ../N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_osx-arm64_${{ needs.set-date.outputs.date }}.tar.gz N_m3u8DL-RE
- name: Upload Artifact [osx-x64] - name: Upload Artifact [osx-x64]
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@v3.1.3
with: with:
name: osx-x64 name: osx-x64
path: N_m3u8DL-RE_${{ github.event.inputs.tag }}_osx-x64_${{ needs.set-date.outputs.date }}.tar.gz path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_osx-x64_${{ needs.set-date.outputs.date }}.tar.gz
- name: Upload Artifact[osx-arm64] - name: Upload Artifact[osx-arm64]
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@v3.1.3
with: with:
name: osx-arm64 name: osx-arm64
path: N_m3u8DL-RE_${{ github.event.inputs.tag }}_osx-arm64_${{ needs.set-date.outputs.date }}.tar.gz path: N_m3u8DL-RE_${{ needs.set-date.outputs.tag }}_osx-arm64_${{ needs.set-date.outputs.date }}.tar.gz
create_release: create_release:
name: Create release name: Create release