nightly_deploy #459
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: nightly_deploy | |
on: | |
schedule: | |
- cron: '30 18 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
# optional Regex for assets names recognition (this is example of asset name matching used regex - "DumpTS-linux-nightly.zip") | |
ASSETS_NAMES_REGEX: DumpTS-(linux|macos|x64-Release)-nightly-.+\.(zip|tar\.gz) | |
# Path to the solution file relative to the root of the project. | |
SOLUTION_FILE_PATH: ./build/DumpTS_vc15.sln | |
# Configuration type to build. | |
# You can convert this to a build matrix if you need coverage of multiple configuration types. | |
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
BUILD_CONFIGURATION: Release | |
BUILD_PLATFORM: x64 | |
jobs: | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: make | |
run: cd ./build/macos; make | |
- name: Archive Release | |
uses: thedoctor0/zip-release@master | |
with: | |
type: 'tar' | |
filename: DumpTS.tar.gz | |
path: DumpTS | |
directory: ./bin/macos | |
- name: Deploy Mac-OS release | |
uses: WebFreak001/deploy-nightly@v1.1.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: https://uploads.github.com/repos/wangf1978/DumpTS/releases/63095007/assets{?name,label} | |
release_id: 63095007 | |
asset_path: ./bin/macos/DumpTS.tar.gz # path to archive to upload | |
asset_name: DumpTS-macos-nightly-$$.tar.gz # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash | |
assets_names_regex: ${{env.ASSETS_NAMES_REGEX}} | |
asset_content_type: application/zip | |
max_releases: 7 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted | |
build-ubuntu-latest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: make | |
run: | |
cd ./build/linux;make | |
- name: Archive Release | |
uses: thedoctor0/zip-release@master | |
with: | |
type: 'tar' | |
filename: DumpTS.tar.gz | |
path: DumpTS | |
directory: ./bin/linux | |
- name: Deploy linux release | |
uses: WebFreak001/deploy-nightly@v1.1.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: https://uploads.github.com/repos/wangf1978/DumpTS/releases/63095007/assets{?name,label} | |
release_id: 63095007 | |
asset_path: ./bin/linux/DumpTS.tar.gz # path to archive to upload | |
asset_name: DumpTS-linux-nightly-$$.tar.gz # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash | |
assets_names_regex: ${{env.ASSETS_NAMES_REGEX}} | |
asset_content_type: application/zip | |
max_releases: 7 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted | |
build-windows-latest: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v1.0.2 | |
- name: Restore NuGet packages | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: nuget restore ${{env.SOLUTION_FILE_PATH}} | |
- name: Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
# Add additional options to the MSBuild command line here (like platform or verbosity level). | |
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | |
run: | | |
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.SOLUTION_FILE_PATH}} | |
- name: Archive Release | |
uses: thedoctor0/zip-release@master | |
with: | |
type: 'zip' | |
filename: DumpTS.zip | |
path: DumpTS.exe | |
directory: ./bin/${{env.BUILD_CONFIGURATION}}/${{env.BUILD_PLATFORM}}/ | |
- name: Deploy Windows release | |
uses: WebFreak001/deploy-nightly@v1.1.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: https://uploads.github.com/repos/wangf1978/DumpTS/releases/63095007/assets{?name,label} | |
release_id: 63095007 | |
asset_path: ./bin/${{env.BUILD_CONFIGURATION}}/${{env.BUILD_PLATFORM}}/DumpTS.zip # path to archive to upload | |
asset_name: DumpTS-${{env.BUILD_PLATFORM}}-${{env.BUILD_CONFIGURATION}}-nightly-$$.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash | |
assets_names_regex: ${{env.ASSETS_NAMES_REGEX}} | |
asset_content_type: application/zip | |
max_releases: 7 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted |