Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #86

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #86

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build
on:
push:
branches: [main]
tags: ["*"]
pull_request:
branches: [main]
env:
DotNetVersion: "7.0.x"
BuildConfiguration: "Release"
BuildParameters: "/clp:NoSummary /p:Configuration=Release /p:BuildVersion=${{ github.run_id }} /p:BuildBranch=${{ github.ref }}"
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNetVersion }}
- name: Build PabloDraw
run: dotnet publish Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-windows.binlog
- name: Build PabloDraw.Console
run: dotnet publish Source/PabloDraw.Console/PabloDraw.Console.cxproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw.console-windows.binlog
- name: Build msi
run: dotnet build ${{ env.BuildParameters }} Source/PabloDraw.WindowsInstaller/PabloDraw.WindowsInstaller.wixproj
- uses: actions/upload-artifact@v2
with:
name: pablodraw-windows-binaries-x64
path: artifacts/publish/${{ env.BuildConfiguration }}/Windows/*
- uses: actions/upload-artifact@v2
with:
name: pablodraw-windows-installer-x64
path: artifacts/installer/${{ env.BuildConfiguration }}/Windows/*.msi
- name: Upload log files
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: log
path: artifacts/log/**/*
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNetVersion }}
- name: Build PabloDraw
run: dotnet publish Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-linux.binlog
- name: Create gzip
run: tar -czvf pablodraw-linux-x64.tar.gz -C artifacts/publish/${{ env.BuildConfiguration }}/Linux .
- uses: actions/upload-artifact@v2
with:
name: pablodraw-linux-binaries-x64
path: pablodraw-linux-x64.tar.gz
- name: Upload log files
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: log
path: artifacts/log/**/*
build-mac:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DotNetVersion }}
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 13.1
- name: Import code signing certificate
if: github.event_name != 'pull_request'
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.DEVID_CERTIFICATE_P12 }}
p12-password: ${{ secrets.DEVID_CERTIFICATE_P12_PASSWORD }}
- name: Enable code signing
if: github.event_name != 'pull_request'
run: echo "BuildParameters=${{ env.BuildParameters }} /p:EnableCodeSigning=True" >> $GITHUB_ENV
- name: Set notarization credentials
if: startsWith(github.ref, 'refs/tags/')
run: |
xcrun altool --store-password-in-keychain-item "AC_PASSWORD" -u "${{ secrets.AC_USERNAME }}" -p "${{ secrets.AC_PASSWORD }}"
echo "BuildParameters=${{ env.BuildParameters }} /p:EnableNotarization=True" >> $GITHUB_ENV
- name: Build PabloDraw
run: sudo dotnet build Source/PabloDraw/PabloDraw.csproj ${{ env.BuildParameters }} /bl:artifacts/log/pablodraw-mac.binlog
- uses: actions/upload-artifact@v2
with:
name: pablodraw-mac
path: artifacts/publish/${{ env.BuildConfiguration }}/Mac/*.dmg
- name: Upload log files
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: log
path: artifacts/log/**/*
update-release:
needs: [build-windows, build-mac, build-linux]
runs-on: ubuntu-latest
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
steps:
- id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4
- uses: softprops/action-gh-release@v1
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
files: |
**/*.msi
**/*.dmg
**/*.tar.gz