Support stop endpoint instead of Pause in QBT 5.0 #20
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 7.0.x | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build win-x64 | |
run: dotnet publish QbtManager.sln -c Release --runtime win-x64 --self-contained -o artifacts/QbtManager-win /p:PublishSingleFile=true /p:AssemblyVersion=1.0.${{ github.run_number }} | |
- name: Build linux-x64 | |
run: dotnet publish QbtManager.sln -c Release --runtime linux-x64 --self-contained -o artifacts/QbtManager-linux /p:PublishSingleFile=true /p:AssemblyVersion=1.0.${{ github.run_number }} | |
- name: Build osx-x64 | |
run: dotnet publish QbtManager.sln -c Release --runtime osx-x64 --self-contained -o artifacts/QbtManager-osx /p:PublishSingleFile=true /p:AssemblyVersion=1.0.${{ github.run_number }} | |
- name: Zip the Win release | |
run: zip ./artifacts/QbtManager-win.zip ./artifacts/QbtManager-win/QbtManager.exe | |
- name: Zip the OSX release | |
run: zip ./artifacts/QbtManager-osx.zip ./artifacts/QbtManager-osx/QbtManager | |
- name: Zip the Linux release | |
run: zip ./artifacts/QbtManager-linux.zip ./artifacts/QbtManager-linux/QbtManager | |
- name: Create the Release | |
id: create_release | |
if: ${{ github.event_name == 'push' }} | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: 1.0.${{ github.run_number }} | |
release_name: Release 1.0.${{ github.run_number }} | |
draft: false | |
- name: Upload qbtmanager-win | |
if: ${{ github.event_name == 'push' }} | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./artifacts/QbtManager-win.zip | |
asset_name: QbtManager-win.zip | |
asset_content_type: application/exe | |
- name: Upload qbtmanager-linux | |
if: ${{ github.event_name == 'push' }} | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./artifacts/QbtManager-linux.zip | |
asset_name: QbtManager-linux.zip | |
asset_content_type: application/exe | |
- name: Upload qbtmanager-osx | |
if: ${{ github.event_name == 'push' }} | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./artifacts/QbtManager-osx.zip | |
asset_name: QbtManager-osx.zip | |
asset_content_type: application/exe | |