pretty up the workflows
This commit is contained in:
parent
97b792868f
commit
cd7040cdc7
30
.github/workflows/build-linux.yml
vendored
30
.github/workflows/build-linux.yml
vendored
@ -8,37 +8,37 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
version_override:
|
version_override:
|
||||||
type: string
|
type: string
|
||||||
description: 'Version number override'
|
description: "Version number override"
|
||||||
required: false
|
required: false
|
||||||
run_unit_tests:
|
run_unit_tests:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: 'Skip running unit tests'
|
description: "Skip running unit tests"
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
runs_on:
|
runs_on:
|
||||||
type: string
|
type: string
|
||||||
description: 'The GitHub hosted runner to use'
|
description: "The GitHub hosted runner to use"
|
||||||
required: true
|
required: true
|
||||||
OS:
|
OS:
|
||||||
type: string
|
type: string
|
||||||
description: >
|
description: >
|
||||||
The operating system targeted by the build.
|
The operating system targeted by the build.
|
||||||
|
|
||||||
There must be a corresponding Bundle_$OS.sh script file in ./Scripts
|
There must be a corresponding Bundle_$OS.sh script file in ./Scripts
|
||||||
required: true
|
required: true
|
||||||
architecture:
|
architecture:
|
||||||
type: string
|
type: string
|
||||||
description: 'CPU architecture targeted by the build.'
|
description: "CPU architecture targeted by the build."
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOTNET_CONFIGURATION: 'Release'
|
DOTNET_CONFIGURATION: "Release"
|
||||||
DOTNET_VERSION: '8.0.x'
|
DOTNET_VERSION: "8.0.x"
|
||||||
RELEASE_NAME: 'chardonnay'
|
RELEASE_NAME: "chardonnay"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: '${{ inputs.OS }}-${{ inputs.architecture }}'
|
name: "${{ inputs.OS }}-${{ inputs.architecture }}"
|
||||||
runs-on: ${{ inputs.runs_on }}
|
runs-on: ${{ inputs.runs_on }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@ -60,7 +60,7 @@ jobs:
|
|||||||
version="$(grep -Eio -m 1 '<Version>.*</Version>' ./Source/AppScaffolding/AppScaffolding.csproj | sed -r 's/<\/?Version>//g')"
|
version="$(grep -Eio -m 1 '<Version>.*</Version>' ./Source/AppScaffolding/AppScaffolding.csproj | sed -r 's/<\/?Version>//g')"
|
||||||
fi
|
fi
|
||||||
echo "version=${version}" >> "${GITHUB_OUTPUT}"
|
echo "version=${version}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
- name: Unit test
|
- name: Unit test
|
||||||
if: ${{ inputs.run_unit_tests }}
|
if: ${{ inputs.run_unit_tests }}
|
||||||
working-directory: ./Source
|
working-directory: ./Source
|
||||||
@ -69,7 +69,7 @@ jobs:
|
|||||||
- name: Publish
|
- name: Publish
|
||||||
id: publish
|
id: publish
|
||||||
working-directory: ./Source
|
working-directory: ./Source
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ inputs.OS }}" == "MacOS" ]]
|
if [[ "${{ inputs.OS }}" == "MacOS" ]]
|
||||||
then
|
then
|
||||||
display_os="macOS"
|
display_os="macOS"
|
||||||
@ -78,13 +78,13 @@ jobs:
|
|||||||
display_os="Linux"
|
display_os="Linux"
|
||||||
RUNTIME_ID="linux-${{ inputs.architecture }}"
|
RUNTIME_ID="linux-${{ inputs.architecture }}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OUTPUT="bin/Publish/${display_os}-${{ inputs.architecture }}-${{ env.RELEASE_NAME }}"
|
OUTPUT="bin/Publish/${display_os}-${{ inputs.architecture }}-${{ env.RELEASE_NAME }}"
|
||||||
|
|
||||||
echo "display_os=${display_os}" >> $GITHUB_OUTPUT
|
echo "display_os=${display_os}" >> $GITHUB_OUTPUT
|
||||||
echo "Runtime Identifier: $RUNTIME_ID"
|
echo "Runtime Identifier: $RUNTIME_ID"
|
||||||
echo "Output Directory: $OUTPUT"
|
echo "Output Directory: $OUTPUT"
|
||||||
|
|
||||||
dotnet publish \
|
dotnet publish \
|
||||||
LibationAvalonia/LibationAvalonia.csproj \
|
LibationAvalonia/LibationAvalonia.csproj \
|
||||||
--runtime $RUNTIME_ID \
|
--runtime $RUNTIME_ID \
|
||||||
@ -122,7 +122,7 @@ jobs:
|
|||||||
${SCRIPT} "${BUNDLE_DIR}" "${{ steps.get_version.outputs.version }}" "${{ inputs.architecture }}"
|
${SCRIPT} "${BUNDLE_DIR}" "${{ steps.get_version.outputs.version }}" "${{ inputs.architecture }}"
|
||||||
artifact=$(ls ./bundle)
|
artifact=$(ls ./bundle)
|
||||||
echo "artifact=${artifact}" >> "${GITHUB_OUTPUT}"
|
echo "artifact=${artifact}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
- name: Publish bundle
|
- name: Publish bundle
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
12
.github/workflows/build-windows.yml
vendored
12
.github/workflows/build-windows.yml
vendored
@ -8,21 +8,21 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
version_override:
|
version_override:
|
||||||
type: string
|
type: string
|
||||||
description: 'Version number override'
|
description: "Version number override"
|
||||||
required: false
|
required: false
|
||||||
run_unit_tests:
|
run_unit_tests:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: 'Skip running unit tests'
|
description: "Skip running unit tests"
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOTNET_CONFIGURATION: 'Release'
|
DOTNET_CONFIGURATION: "Release"
|
||||||
DOTNET_VERSION: '8.0.x'
|
DOTNET_VERSION: "8.0.x"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: '${{ matrix.os }}-${{ matrix.release_name }}'
|
name: "${{ matrix.os }}-${{ matrix.release_name }}"
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -112,4 +112,4 @@ jobs:
|
|||||||
name: ${{ steps.zip.outputs.artifact }}.zip
|
name: ${{ steps.zip.outputs.artifact }}.zip
|
||||||
path: ./Source/bin/Publish/${{ steps.zip.outputs.artifact }}.zip
|
path: ./Source/bin/Publish/${{ steps.zip.outputs.artifact }}.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|||||||
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
@ -8,22 +8,21 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
version_override:
|
version_override:
|
||||||
type: string
|
type: string
|
||||||
description: 'Version number override'
|
description: "Version number override"
|
||||||
required: false
|
required: false
|
||||||
run_unit_tests:
|
run_unit_tests:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: 'Skip running unit tests'
|
description: "Skip running unit tests"
|
||||||
required: false
|
required: false
|
||||||
default: true
|
default: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
uses: ./.github/workflows/build-windows.yml
|
uses: ./.github/workflows/build-windows.yml
|
||||||
with:
|
with:
|
||||||
version_override: ${{ inputs.version_override }}
|
version_override: ${{ inputs.version_override }}
|
||||||
run_unit_tests: ${{ inputs.run_unit_tests }}
|
run_unit_tests: ${{ inputs.run_unit_tests }}
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -36,7 +35,7 @@ jobs:
|
|||||||
OS: ${{ matrix.OS }}
|
OS: ${{ matrix.OS }}
|
||||||
architecture: ${{ matrix.architecture }}
|
architecture: ${{ matrix.architecture }}
|
||||||
run_unit_tests: ${{ inputs.run_unit_tests }}
|
run_unit_tests: ${{ inputs.run_unit_tests }}
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -47,4 +46,4 @@ jobs:
|
|||||||
runs_on: macos-latest
|
runs_on: macos-latest
|
||||||
OS: MacOS
|
OS: MacOS
|
||||||
architecture: ${{ matrix.architecture }}
|
architecture: ${{ matrix.architecture }}
|
||||||
run_unit_tests: ${{ inputs.run_unit_tests }}
|
run_unit_tests: ${{ inputs.run_unit_tests }}
|
||||||
|
|||||||
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@ -8,11 +8,11 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
type: string
|
type: string
|
||||||
description: 'Version number'
|
description: "Version number"
|
||||||
required: true
|
required: true
|
||||||
release:
|
release:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: 'Is this a release build?'
|
description: "Is this a release build?"
|
||||||
required: true
|
required: true
|
||||||
secrets:
|
secrets:
|
||||||
docker_username:
|
docker_username:
|
||||||
|
|||||||
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
@ -5,7 +5,7 @@ name: release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- "v*"
|
||||||
jobs:
|
jobs:
|
||||||
prerelease:
|
prerelease:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -15,7 +15,7 @@ jobs:
|
|||||||
- name: Get tag version
|
- name: Get tag version
|
||||||
id: get_version
|
id: get_version
|
||||||
run: |
|
run: |
|
||||||
export TAG='${{ github.ref_name }}'
|
export TAG="${{ github.ref_name }}"
|
||||||
echo "version=${TAG#v}" >> "${GITHUB_OUTPUT}"
|
echo "version=${TAG#v}" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
@ -34,9 +34,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version_override: ${{ needs.prerelease.outputs.version }}
|
version_override: ${{ needs.prerelease.outputs.version }}
|
||||||
run_unit_tests: false
|
run_unit_tests: false
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [prerelease,build]
|
needs: [prerelease, build]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
@ -56,7 +56,7 @@ jobs:
|
|||||||
- name: Upload release assets
|
- name: Upload release assets
|
||||||
uses: dwenegar/upload-release-assets@v2
|
uses: dwenegar/upload-release-assets@v2
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
with:
|
with:
|
||||||
release_id: '${{ steps.release.outputs.id }}'
|
release_id: "${{ steps.release.outputs.id }}"
|
||||||
assets_path: ./artifacts
|
assets_path: ./artifacts
|
||||||
|
|||||||
2
.github/workflows/validate.yml
vendored
2
.github/workflows/validate.yml
vendored
@ -1,5 +1,5 @@
|
|||||||
# validate.yml
|
# validate.yml
|
||||||
# Validates that Libation will build on a pull request or push to master.
|
# Validates that Libation will build on a pull request or push to master.
|
||||||
---
|
---
|
||||||
name: validate
|
name: validate
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user