Consolidate workflows
This commit is contained in:
parent
95fb0eaca4
commit
fe0d699d09
68
.github/workflows/CD.yml
vendored
68
.github/workflows/CD.yml
vendored
@ -1,68 +0,0 @@
|
||||
name: CD
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.3.3
|
||||
|
||||
- name: Get release version
|
||||
id: get-version
|
||||
uses: dawidd6/action-get-tag@v1
|
||||
|
||||
- name: Install .NET
|
||||
uses: actions/setup-dotnet@v1.7.2
|
||||
with:
|
||||
# Fixed version, workaround for https://github.com/dotnet/core/issues/7176
|
||||
dotnet-version: 6.0.100
|
||||
|
||||
- name: Build & publish
|
||||
run: dotnet publish YoutubeDownloader/ -o YoutubeDownloader/bin/Publish --configuration Release
|
||||
|
||||
- name: Pack
|
||||
run: Compress-Archive -Path YoutubeDownloader/bin/Publish/* -DestinationPath YoutubeDownloader/bin/Publish/Archive.zip -Force
|
||||
shell: pwsh
|
||||
|
||||
- name: Create release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
body: |
|
||||
[Changelog](https://github.com/Tyrrrz/YoutubeDownloader/blob/master/Changelog.md)
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload release asset
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: YoutubeDownloader/bin/Publish/Archive.zip
|
||||
asset_name: YoutubeDownloader.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Notify Discord
|
||||
uses: satak/webrequest-action@v1.2.4
|
||||
with:
|
||||
url: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
method: POST
|
||||
headers: |
|
||||
{
|
||||
"ContentType": "application/json; charset=UTF-8"
|
||||
}
|
||||
payload: |
|
||||
{
|
||||
"content": "**YoutubeDownloader** new version released!\nVersion: `${{ steps.get-version.outputs.tag }}`\nChangelog: <https://github.com/Tyrrrz/YoutubeDownloader/blob/${{ steps.get-version.outputs.tag }}/Changelog.md>"
|
||||
}
|
26
.github/workflows/CI.yml
vendored
26
.github/workflows/CI.yml
vendored
@ -1,26 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.3.3
|
||||
|
||||
- name: Install .NET
|
||||
uses: actions/setup-dotnet@v1.7.2
|
||||
with:
|
||||
# Fixed version, workaround for https://github.com/dotnet/core/issues/7176
|
||||
dotnet-version: 6.0.100
|
||||
|
||||
- name: Build & publish
|
||||
run: dotnet publish YoutubeDownloader/ -o YoutubeDownloader/bin/Publish --configuration Release
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: YoutubeDownloader
|
||||
path: YoutubeDownloader/bin/Publish
|
93
.github/workflows/main.yml
vendored
Normal file
93
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
name: main
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
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@v2
|
||||
with:
|
||||
# Fixed version, workaround for https://github.com/dotnet/core/issues/7176
|
||||
dotnet-version: 6.0.100
|
||||
|
||||
- name: Publish
|
||||
run: dotnet publish YoutubeDownloader/ -o YoutubeDownloader/bin/Publish --configuration Release
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: YoutubeDownloader
|
||||
path: YoutubeDownloader/bin/Publish
|
||||
|
||||
deploy:
|
||||
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
|
||||
needs: publish
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: YoutubeDownloader
|
||||
path: YoutubeDownloader
|
||||
|
||||
- name: Create package
|
||||
run: Compress-Archive -Path YoutubeDownloader/* -DestinationPath YoutubeDownloader.zip -Force
|
||||
shell: pwsh
|
||||
|
||||
- name: Create release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
body: |
|
||||
[Changelog](https://github.com/Tyrrrz/YoutubeDownloader/blob/master/Changelog.md)
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload release asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_name: YoutubeDownloader.zip
|
||||
asset_path: YoutubeDownloader.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
notify:
|
||||
needs: deploy
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Get release version
|
||||
id: get_version
|
||||
uses: dawidd6/action-get-tag@v1
|
||||
|
||||
- name: Notify Discord
|
||||
uses: satak/webrequest-action@v1.2.4
|
||||
with:
|
||||
url: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
method: POST
|
||||
headers: |
|
||||
{
|
||||
"ContentType": "application/json; charset=UTF-8"
|
||||
}
|
||||
payload: |
|
||||
{
|
||||
"content": "**YoutubeDownloader** new version released!\nVersion: `${{ steps.get-version.outputs.tag }}`\nChangelog: <https://github.com/Tyrrrz/YoutubeDownloader/blob/${{ steps.get-version.outputs.tag }}/Changelog.md>"
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
# YoutubeDownloader
|
||||
|
||||
[](https://vshymanskyy.github.io/StandWithUkraine)
|
||||
[](https://github.com/Tyrrrz/YoutubeDownloader/actions)
|
||||
[](https://github.com/Tyrrrz/YoutubeDownloader/actions)
|
||||
[](https://github.com/Tyrrrz/YoutubeDownloader/releases)
|
||||
[](https://github.com/Tyrrrz/YoutubeDownloader/releases)
|
||||
[](https://discord.gg/2SUWKFnHSm)
|
||||
@ -30,7 +30,7 @@ To learn more about the war and how you can help, [click here](https://tyrrrz.me
|
||||
## Download
|
||||
|
||||
- 🟢 **[Stable release](https://github.com/Tyrrrz/YoutubeDownloader/releases/latest)**
|
||||
- 🟠 [CI build](https://github.com/Tyrrrz/YoutubeDownloader/actions?query=workflow%3ACI)
|
||||
- 🟠 [CI build](https://github.com/Tyrrrz/YoutubeDownloader/actions/workflows/main.yml)
|
||||
|
||||
## Features
|
||||
|
||||
@ -45,4 +45,4 @@ To learn more about the war and how you can help, [click here](https://tyrrrz.me
|
||||
|
||||

|
||||

|
||||

|
||||

|
Loading…
x
Reference in New Issue
Block a user