-
Notifications
You must be signed in to change notification settings - Fork 8
63 lines (63 loc) · 2.46 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Release
on:
release:
types:
- created
jobs:
CreateAndPushWindowsExecutable:
name: CreateAndPushWindowsExecutable
strategy:
matrix:
go: [ 1.22.7 ]
goarch: [ amd64 ]
runs-on: windows-2019
steps:
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
id: go
- name: Setting EnvVariable to checkout newLine char properly
shell: bash
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- name: Checking out the code
uses: actions/checkout@v2
- name: Test and Build
shell: powershell
run: |
$ErrorView = 'NormalView'
[Environment]::SetEnvironmentVariable("path", "$env:path;$env:GOPATH\bin", "Machine")
.\win_build.ps1 -arch ${{ matrix.goarch }} -version ${{ github.event.release.tag_name }}
- name: Create Tar and Zip
shell: bash
run: |
cp winservices-config.yml.sample ./target/bin/windows_${{ matrix.goarch }}
7z a ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}-${{ matrix.goarch }}.zip ./target/bin/windows_${{ matrix.goarch }}/*
- name: Upload Integration binary
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: .\target\bin\windows_${{ matrix.goarch }}\${{ github.event.repository.name }}.exe
asset_name: ${{ github.event.repository.name }}-${{ matrix.goarch }}.exe
asset_content_type: Integration binary
- name: Upload exporter binary
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: .\target\bin\windows_${{ matrix.goarch }}\windows_exporter.exe
asset_name: windows-exporter-${{ matrix.goarch }}.exe
asset_content_type: Exporter binary
- name: Upload Zip
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ github.event.repository.name }}-${{ github.event.release.tag_name }}-${{ matrix.goarch }}.zip
asset_name: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}-${{ matrix.goarch }}.zip
asset_content_type: Integration Zip