-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build]: Update PCF Tools packages to v0.3.2
- Loading branch information
[pcf-tools]
committed
Jul 22, 2024
1 parent
23d879d
commit b4e9325
Showing
8 changed files
with
173 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
env: | ||
DOTNET_ROLL_FORWARD: Major | ||
DOTNET_NOLOGO: 1 | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Setup: Checkout" | ||
uses: actions/checkout@v4 | ||
- name: "Setup: Node" | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
cache-dependency-path: control/package-lock.json | ||
- name: "Setup: dotnet" | ||
uses: actions/setup-dotnet@v4 | ||
- name: "Build: dotnet restore" | ||
run: dotnet restore | ||
- name: "Build: dotnet build" | ||
run: dotnet build --no-restore | ||
- name: "Build: dotnet test" | ||
run: dotnet test --no-build | ||
- name: "Artifacts: Create file containing URL of repo" | ||
run: echo "${{ github.server_url }}/${{ github.repository }}" > ./dist/repo-url.txt | ||
- name: "Artifacts: Upload artifact" | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ github.event.repository.name }}__extract_this_zip | ||
path: ./dist/* | ||
retention-days: 15 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Draft release | ||
run-name: ${{ github.ref_name }} | ||
|
||
on: | ||
push: | ||
tags: | ||
- v** | ||
|
||
env: | ||
DOTNET_ROLL_FORWARD: Major | ||
DOTNET_NOLOGO: 1 | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
draft_release: | ||
name: Draft release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Setup: Checkout" | ||
uses: actions/checkout@v4 | ||
- name: "Setup: Node" | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
cache-dependency-path: control/package-lock.json | ||
- name: "Setup: dotnet" | ||
uses: actions/setup-dotnet@v4 | ||
- name: "Build: dotnet build" | ||
run: dotnet build | ||
- name: "Setup: zip" | ||
shell: bash | ||
run: | | ||
if ! command -v zip &> /dev/null | ||
then | ||
sudo apt -y update | ||
sudo apt -y install zip | ||
fi | ||
- name: "Configure: Version" | ||
run: echo "Version=${GITHUB_REF##*/v}" >> $GITHUB_ENV | ||
- name: "Build: Version the solution" | ||
run: dotnet msbuild -t:SetVersion -p:NewVersion=${{ env.Version }} | ||
- name: "Build: dotnet build" | ||
run: dotnet build | ||
- name: "Test: dotnet test" | ||
run: dotnet test --no-build | ||
- name: "Test: Prepare code coverage" | ||
run: | | ||
if test -d ./dist/coverage | ||
then | ||
(cd ./dist && zip -r ./coverage.zip ./coverage) | ||
fi | ||
- name: "GitHub: Create draft release" | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
draft: true | ||
files: dist/*.zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: EditorConfig Checker | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
pull_request: | ||
|
||
jobs: | ||
validate-editor-config: | ||
name: Validate editor config | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Setup: Checkout" | ||
uses: actions/checkout@v4 | ||
- name: "Setup: Node" | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: "Setup: editorconfig-checker" | ||
run: npm i -g editorconfig-checker | ||
- name: "Validate: Run editorconfig-checker" | ||
run: editorconfig-checker |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Validate RESX Files | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
paths: | ||
- ".github/workflows/validate-resx-files.yml" | ||
- "**/*.resx" | ||
pull_request: | ||
|
||
jobs: | ||
validate-resx-files: | ||
name: Validate resx files | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Setup: Checkout" | ||
uses: actions/checkout@v4 | ||
- name: "Setup: xmllint" | ||
run: | | ||
if ! command -v xmllint &> /dev/null | ||
then | ||
sudo apt-get update | ||
sudo apt-get install -y libxml2-utils | ||
fi | ||
shell: bash | ||
- name: "Validate: Check resx files contain valid xml" | ||
run: | | ||
shopt -s globstar | ||
error=0 | ||
for resx_file in $(/bin/ls ./**/*.resx) | ||
do | ||
if xmllint --noout "$resx_file" > /dev/null 2>&1 ; | ||
then | ||
echo "Valid: $resx_file" | ||
else | ||
echo "Invalid: $resx_file" && error=1 | ||
fi | ||
done | ||
if [[ "${error}" == "1" ]] | ||
then | ||
exit 1 | ||
fi | ||
shell: bash |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Sdk Name="Cathal.PcfTools.MSBuild.Proj" Version="0.3.0" /> | ||
<Sdk Name="Cathal.PcfTools.MSBuild.Proj" Version="0.3.2" /> | ||
</Project> |
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