Skip to content

#545 Allow "v" prefix for version numbers (#550) #1048

#545 Allow "v" prefix for version numbers (#550)

#545 Allow "v" prefix for version numbers (#550) #1048

name: Test on windows
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: windows-latest
defaults:
run:
shell: "bash"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: |
11
17
cache: "maven"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Go tools
run: go install github.com/google/[email protected]
- name: Build and install
run: mvn --batch-mode -DtrimStackTrace=false clean install
- name: Run project-keeper itself
id: pk-verify
run: mvn --batch-mode -DtrimStackTrace=false com.exasol:project-keeper-maven-plugin:verify --projects .
- name: Verify Release Artifacts
run: |
print_message() {
local -r message=$1
echo "$message"
echo "$message" >> "$GITHUB_STEP_SUMMARY"
}
print_message "# Release Artifacts"
IFS=$'\n' artifacts_array=($ARTIFACTS)
missing_files=()
for file in "${artifacts_array[@]}";
do
echo "Checking if file $file exists..."
if ! [[ -f "$file" ]]; then
print_message "* ⚠️ \`$file\` does not exist ⚠️"
echo "Content of directory $(dirname "$file"):"
ls "$(dirname "$file")"
missing_files+=("$file")
else
print_message "* \`$file\` ✅"
fi
done
print_message ""
number_of_missing_files=${#missing_files[@]}
if [[ $number_of_missing_files -gt 0 ]]; then
print_message "⚠️ $number_of_missing_files release artifact(s) missing ⚠️"
exit 1
else
print_message "All ${#artifacts_array[@]} artifact(s) present ✅"
fi
env:
ARTIFACTS: ${{ steps.pk-verify.outputs.release-artifacts }}