mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-26 06:36:36 +00:00
Compare commits
2 Commits
v0.26.0-rc
...
v0.26.0-rc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13ebec0195 | ||
|
|
cc89ae33a4 |
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
@@ -18,12 +18,12 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# fetch-depth required for gitversion in `Build` step
|
# fetch-depth required for gitversion in `Build` step
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: actions/setup-go@v3
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: 'go.mod'
|
go-version-file: 'go.mod'
|
||||||
|
|
||||||
@@ -42,9 +42,7 @@ jobs:
|
|||||||
Expand-Archive -Path promu-$($Env:PROMU_VER).windows-amd64.zip -DestinationPath .
|
Expand-Archive -Path promu-$($Env:PROMU_VER).windows-amd64.zip -DestinationPath .
|
||||||
Copy-Item -Path promu-$($Env:PROMU_VER).windows-amd64\promu.exe -Destination "$(go env GOPATH)\bin"
|
Copy-Item -Path promu-$($Env:PROMU_VER).windows-amd64\promu.exe -Destination "$(go env GOPATH)\bin"
|
||||||
|
|
||||||
# No binaries available so build from source
|
# GOPATH\bin dir must be added to PATH else the `promu` commands won't be found
|
||||||
go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@v1.4.0
|
|
||||||
# GOPATH\bin dir must be added to PATH else the `promu` and `goversioninfo` commands won't be found
|
|
||||||
echo "$(go env GOPATH)\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
echo "$(go env GOPATH)\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
@@ -53,9 +51,6 @@ jobs:
|
|||||||
|
|
||||||
dotnet-gitversion /output json /showvariable FullSemVer | Set-Content VERSION -PassThru
|
dotnet-gitversion /output json /showvariable FullSemVer | Set-Content VERSION -PassThru
|
||||||
$Version = Get-Content VERSION
|
$Version = Get-Content VERSION
|
||||||
# Windows versioninfo resources need the file version by parts (but product version is free text)
|
|
||||||
$VersionParts = ($Version -replace '^v?([0-9\.]+).*$','$1').Split(".")
|
|
||||||
goversioninfo.exe -ver-major $VersionParts[0] -ver-minor $VersionParts[1] -ver-patch $VersionParts[2] -product-version $Version -platform-specific
|
|
||||||
|
|
||||||
make crossbuild
|
make crossbuild
|
||||||
# '+' symbols are invalid characters in image tags
|
# '+' symbols are invalid characters in image tags
|
||||||
@@ -67,7 +62,7 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: windows_exporter_binaries
|
name: windows_exporter_binaries
|
||||||
path: output\windows_exporter-*.exe
|
path: output\windows_exporter-*.exe
|
||||||
@@ -90,7 +85,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Login to GitHub container registry
|
- name: Login to GitHub container registry
|
||||||
if: ${{ github.event_name != 'pull_request' }}
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
|
|||||||
Reference in New Issue
Block a user