Skip to content

Windows + Linux builds and auto versioning #10

Windows + Linux builds and auto versioning

Windows + Linux builds and auto versioning #10

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*' # Triggers on version tags
branches:
- '**' # Triggers on all branches
jobs:
build:
runs-on: ubuntu-latest # Use a single runner
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0'
- name: Git Version
id: version
uses: codacy/[email protected]
- name: Build
run: |
dotnet publish --configuration Release --runtime win-x64 --no-self-contained --property:PublishDir=./output/windows
dotnet publish --configuration Release --runtime linux-x64 --no-self-contained --property:PublishDir=./output/linux
cd ./src/MagesScriptTool/output/windows
zip -r ../../../magesscripttool-windows-amd64.zip ./*
cd ../linux
zip -r ../../../magesscripttool-linux-amd64.zip ./*
cd ../../../
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
magesscripttool-linux-amd64.zip
magesscripttool-windows-amd64.zip
tag_name: ${{ steps.version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}