Merge branch 'develop' #132
This file contains 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: main | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "*" | |
jobs: | |
package: | |
runs-on: windows-latest | |
env: | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Publish | |
run: | | |
dotnet publish M3u8Downloader_H/ -o M3u8Downloader_H/bin/Publish --configuration Release | |
dotnet publish M3u8Downloader_H.PluginManager/ -o M3u8Downloader_H/bin/Publish --configuration Release | |
dotnet publish M3u8Downloader_H/ -o M3u8Downloader_H/bin/PublishSingleFile -c Release --self-contained true -r win7-x64 -p:PublishSingleFile=true | |
dotnet publish M3u8Downloader_H.PluginManager/ -o M3u8Downloader_H/bin/PublishSingleFile -c Release --self-contained true -r win7-x64 -p:PublishSingleFile=true | |
- name: Upload artifacts normal | |
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: M3u8Downloader_H | |
path: M3u8Downloader_H/bin/Publish | |
- name: Upload artifacts single file | |
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: M3u8Downloader_H-SingleFile | |
path: M3u8Downloader_H/bin/PublishSingleFile | |
deploy: | |
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} | |
needs: package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts normal | |
uses: actions/download-artifact@v3 | |
with: | |
name: M3u8Downloader_H | |
path: M3u8Downloader_H | |
- name: Download artifacts single file | |
uses: actions/download-artifact@v3 | |
with: | |
name: M3u8Downloader_H-SingleFile | |
path: M3u8Downloader_H-SingleFile | |
- name: Create package | |
run: | | |
Compress-Archive -Path M3u8Downloader_H/* -DestinationPath M3u8Downloader_H.zip -Force | |
Compress-Archive -Path M3u8Downloader_H-SingleFile/* -DestinationPath M3u8Downloader_H-SingleFile.zip -Force | |
shell: pwsh | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: | | |
- [更新日志](https://github.com/Harlan-H/M3u8Downloader_H/blob/master/Changelog.md) | |
draft: false | |
prerelease: false | |
files: | | |
M3u8Downloader_H.zip | |
M3u8Downloader_H-SingleFile.zip |