Release #29
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
name: Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
workflow_dispatch: | |
jobs: | |
build_artifacts: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
# - name: Restore win-x64 dependencies | |
# run: dotnet restore -r win-x64 | |
# - name: Build win-x64 | |
# run: msbuild SQLSchemaCompare.sln /p:Configuration=Release /p:RuntimeIdentifier=win-x64 | |
# - name: Publish win-x64 | |
# run: dotnet publish SQLSchemaCompare.UI.csproj --no-build --no-restore -c Release -r win-x64 | |
# working-directory: SQLSchemaCompare.UI | |
# - name: Upload SQLSchemaCompare artifacts | |
# uses: actions/upload-artifact@v4.3.5 | |
# with: | |
# name: SQLSchemaCompare | |
# path: SQLSchemaCompare | |
# - name: Upload win-x64 artifacts | |
# uses: actions/upload-artifact@v4.3.5 | |
# with: | |
# name: publish-win | |
# path: .publish | |
# - name: Restore linux-x64 dependencies | |
# run: dotnet restore -r linux-x64 | |
# - name: Build linux-x64 | |
# run: msbuild SQLSchemaCompare.sln /p:Configuration=Release /p:RuntimeIdentifier=linux-x64 | |
# - name: Publish linux-x64 | |
# run: dotnet publish SQLSchemaCompare.UI.csproj --no-build --no-restore -c Release -r linux-x64 | |
# working-directory: SQLSchemaCompare.UI | |
# - name: Upload linux-x64 artifacts | |
# uses: actions/upload-artifact@v4.3.5 | |
# with: | |
# name: publish-linux | |
# path: .publish | |
- name: Restore osx-x64 dependencies | |
run: dotnet restore -r osx-x64 | |
- name: Build osx-x64 | |
run: msbuild SQLSchemaCompare.sln /p:Configuration=Release /p:RuntimeIdentifier=osx-x64 | |
- name: Publish osx-x64 | |
run: dotnet publish SQLSchemaCompare.UI.csproj --no-build --no-restore -c Release -r osx-x64 | |
working-directory: SQLSchemaCompare.UI | |
- name: Upload osx-x64 artifacts | |
uses: actions/upload-artifact@v4.3.5 | |
with: | |
name: publish-osx | |
path: .publish | |
# installer_win_x64: | |
# runs-on: windows-latest | |
# needs: build_artifacts | |
# defaults: | |
# run: | |
# shell: bash | |
# steps: | |
# - name: Setup Node.js | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: 20 | |
# - name: Download SQLSchemaCompare artifact | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: SQLSchemaCompare | |
# path: SQLSchemaCompare | |
# - name: Download publish-win artifact | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: publish-win | |
# path: .publish | |
# - name: Create installer | |
# run: yarn dist-win-x64 | |
# working-directory: SQLSchemaCompare | |
# - name: Upload installer to release | |
# uses: svenstaro/upload-release-action@v2 | |
# with: | |
# repo_token: ${{ secrets.GITHUB_TOKEN }} | |
# file_glob: true | |
# file: installer/*.exe | |
# tag: ${{ github.ref }} | |
# installer_linux_x64: | |
# runs-on: ubuntu-latest | |
# needs: build_artifacts | |
# defaults: | |
# run: | |
# shell: bash | |
# steps: | |
# - name: Setup Node.js | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version: 20 | |
# - name: Download SQLSchemaCompare artifact | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: SQLSchemaCompare | |
# path: SQLSchemaCompare | |
# - name: Download publish-linux artifact | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: publish-linux | |
# path: .publish | |
# - name: Prepare artifacts | |
# run: | | |
# chmod -R a+rwx SQLSchemaCompare/node_modules | |
# chmod +x .publish/TiCodeX.SQLSchemaCompare.UI | |
# chmod +x .publish/TiCodeX.SQLSchemaCompare.CLI | |
# - name: Create installer | |
# run: yarn dist-linux-x64 | |
# working-directory: SQLSchemaCompare | |
# - name: Upload installer to release | |
# uses: svenstaro/upload-release-action@v2 | |
# with: | |
# repo_token: ${{ secrets.GITHUB_TOKEN }} | |
# file_glob: true | |
# file: installer/*.{deb,rpm,tar.gz} | |
# tag: ${{ github.ref }} | |
installer_osx_x64: | |
runs-on: macos-latest | |
needs: build_artifacts | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Download SQLSchemaCompare artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: SQLSchemaCompare | |
path: SQLSchemaCompare | |
- name: Download publish-osx artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: publish-osx | |
path: .publish | |
- name: Prepare artifacts | |
run: | | |
chmod -R a+rwx SQLSchemaCompare/node_modules | |
chmod +x .publish/TiCodeX.SQLSchemaCompare.UI | |
chmod +x .publish/TiCodeX.SQLSchemaCompare.CLI | |
- name: Create installer | |
run: yarn dist-osx-x64 | |
working-directory: SQLSchemaCompare | |
# - name: Upload installer to release | |
# uses: svenstaro/upload-release-action@v2 | |
# with: | |
# repo_token: ${{ secrets.GITHUB_TOKEN }} | |
# file_glob: true | |
# file: installer/*.dmg | |
# tag: ${{ github.ref }} | |
- name: Upload installer to artifacts | |
uses: actions/upload-artifact@v4.3.5 | |
with: | |
name: installer-osx | |
path: installer | |
clean_artifacts: | |
runs-on: windows-latest | |
if: always() | |
needs: [installer_osx_x64] | |
steps: | |
- uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: | | |
SQLSchemaCompare | |
publish-win | |
publish-linux | |
publish-osx |