Fallback to dev_usb000 if IDPS is not found on dev_hdd0 #34
Workflow file for this run
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
# https://acraven.medium.com/a-nuget-package-workflow-using-github-actions-7da8c6557863 | |
name: Create new release from pushed tag | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, windows-latest ] | |
name: Build, Test, and Upload Builds (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Set VERSION variable from tag | |
if: ${{ contains(github.ref, 'refs/tags') }} | |
shell: bash | |
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | |
- name: Print VERSION variable for debugging | |
shell: bash | |
run: echo "$VERSION" | |
- name: Publish for Linux x64 | |
if: matrix.os == 'ubuntu-latest' | |
run: dotnet publish -c Release -r linux-x64 --self-contained Refresher /p:Version=${VERSION} | |
- name: Publish for Windows x64 | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: dotnet publish -c Release -r win-x64 --self-contained Refresher //p:Version=${VERSION} | |
- name: Upload Linux x64 build | |
if: matrix.os == 'ubuntu-latest' | |
uses: actions/[email protected] | |
with: | |
name: "Refresher_for_Linux_x64" | |
path: "Refresher/bin/Release/net8.0/linux-x64/publish/" | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Upload Windows x64 build | |
if: matrix.os == 'windows-latest' | |
uses: actions/[email protected] | |
with: | |
name: "Refresher_for_Windows_x64" | |
path: "Refresher/bin/Release/net8.0-windows/win-x64/publish/" | |
if-no-files-found: error | |
retention-days: 1 | |
release: | |
name: Release Built Artifacts | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
id: download | |
uses: actions/[email protected] | |
- name: Create zip files | |
run: | | |
cd ${{steps.download.outputs.download-path}}/Refresher_for_Windows_x64 | |
zip -r "${{steps.download.outputs.download-path}}/Refresh_for_Windows_x64.zip" . | |
cd ${{steps.download.outputs.download-path}}/Refresher_for_Linux_x64 | |
zip -r "${{steps.download.outputs.download-path}}/Refresh_for_Linux_x64.zip" . | |
- uses: marvinpinto/action-automatic-releases@latest | |
name: "Create release" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
draft: true | |
files: | | |
*.zip |