-
Notifications
You must be signed in to change notification settings - Fork 1
141 lines (137 loc) · 4.84 KB
/
dotnetcore.yml
File metadata and controls
141 lines (137 loc) · 4.84 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: .NET Core
on:
workflow_dispatch:
push:
paths:
- 'LICENSE'
- 'docker/**'
- 'src/**'
- 'tests/**'
- '!docs/**'
- '!README.md'
jobs:
build-linux-x64:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v1
- name: Setup
uses: actions/setup-dotnet@v1
with:
dotnet-version: 10.0.100
- name: Version
id: version
run: echo "version=$($PWD/scripts/version.sh)" >> $GITHUB_OUTPUT
- name: Build
run: scripts/build-dotnet.sh
- name: Tests
uses: dorny/test-reporter@v1
if: always()
with:
name: tests-linux-x64
path: "**/test-results.trx"
reporter: dotnet-trx
fail-on-error: true
- name: Package
run: scripts/package.sh
- name: Release
if: github.ref == 'refs/heads/master'
uses: actions/create-release@v1
id: release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ steps.version.outputs.version }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
- name: Upload sql-d.nupkg
if: github.ref == 'refs/heads/master'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: packages/sql-d.${{ steps.version.outputs.version }}.nupkg
asset_name: sql-d.${{ steps.version.outputs.version }}.nupkg
asset_content_type: application/gzip
- name: Upload SqlD.UI.tar.gz
if: github.ref == 'refs/heads/master'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: packages/SqlD.UI.${{ steps.version.outputs.version }}.tar.gz
asset_name: SqlD.UI.${{ steps.version.outputs.version }}.tar.gz
asset_content_type: application/gzip
- name: Upload SqlD.UI.zip
if: github.ref == 'refs/heads/master'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: packages/SqlD.UI.${{ steps.version.outputs.version }}.zip
asset_name: SqlD.UI.${{ steps.version.outputs.version }}.zip
asset_content_type: application/gzip
- name: Upload SqlD.UI.deb
if: github.ref == 'refs/heads/master'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: packages/SqlD.UI.${{ steps.version.outputs.version }}.deb
asset_name: SqlD.UI.${{ steps.version.outputs.version }}.deb
asset_content_type: application/gzip
- name: Upload SqlD.UI.rpm
if: github.ref == 'refs/heads/master'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: packages/SqlD.UI.${{ steps.version.outputs.version }}.rpm
asset_name: SqlD.UI.${{ steps.version.outputs.version }}.rpm
asset_content_type: application/gzip
- name: Publish NuGet package
if: github.ref == 'refs/heads/master'
run: |
dotnet nuget push packages/sql-d.${{ steps.version.outputs.version }}.nupkg --api-key "${{ secrets.NUGET }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: DockerHub Login
if: github.ref == 'refs/heads/master'
uses: docker/login-action@v3
with:
username: realorko
password: ${{ secrets.DOCKER }}
- name: DockerHub Build/Push
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v6
with:
context: "."
file: "docker/Dockerfile"
push: true
tags: realorko/sql-d:${{ steps.version.outputs.version }}
# This is hot garbage, will look at this later ... :/
# build-win-x64:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v1
# - name: Setup .NET Core
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 8.0.401
# - name: Build with dotnet win-x64
# run: .\scripts\build.bat
# shell: cmd
# build-osx-x64:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v1
# - name: Setup .NET Core
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 8.0.401
# - name: Build with osx-x64
# run: scripts/build-dotnet.sh