Skip to content

fix: fixed now go to the proper directory on linux #22

fix: fixed now go to the proper directory on linux

fix: fixed now go to the proper directory on linux #22

Workflow file for this run

name: Create Release
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore
- name: Build the project for Linux
if: matrix.os == 'ubuntu-latest'
run: dotnet publish -c Release -r linux-x64 --self-contained -p:PublishAot=true
- name: Build the project for Windows
if: matrix.os == 'windows-latest'
run: dotnet publish -c Release -r win-x64 --self-contained -p:PublishAot=true
- name: Build the project for macOS
if: matrix.os == 'macos-latest'
run: dotnet publish -c Release -r osx-arm64 --self-contained -p:PublishAot=true
- name: Archive the build artifacts for Linux
if: matrix.os == 'ubuntu-latest'
run: tar -czvf whichcam-macos.tar.gz -C ./ module.json -C ./bin/Release/net8.0/linux-x64/publish whichcam
- name: Archive the build artifacts for Windows
if: matrix.os == 'windows-latest'
run: Compress-Archive -Path ./module.json, ./bin/Release/net8.0/win-x64/publish/whichcam -DestinationPath whichcam-windows.zip
shell: pwsh
- name: Archive the build artifacts for macOS
if: matrix.os == 'macos-latest'
run: tar -czvf whichcam-macos.tar.gz -C ./ module.json -C ./bin/Release/net8.0/osx-arm64/publish whichcam
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-${{ matrix.os }}
path: |
whichcam-linux.tar.gz
whichcam-windows.zip
whichcam-macos.tar.gz
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download build artifacts for Linux
uses: actions/download-artifact@v3
with:
name: build-ubuntu-latest
path: ./linux
- name: Download build artifacts for Windows
uses: actions/download-artifact@v3
with:
name: build-windows-latest
path: ./windows
- name: Download build artifacts for macOS
uses: actions/download-artifact@v3
with:
name: build-macos-latest
path: ./macos
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
./linux/whichcam-linux.tar.gz
./windows/whichcam-windows.zip
./macos/whichcam-macos.tar.gz