-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (80 loc) · 3.75 KB
/
Copy pathdotnetcore.yml
File metadata and controls
85 lines (80 loc) · 3.75 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
name: .NET Core
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
versionSemVer: "0.1.0"
versionSuffixRoot: "ci"
buildNumber: ${{ github.run_number }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Clean Distribution
run: rm -Rf ./distribution/
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore --version-suffix ${{ env.versionSemVer }}-${{ env.versionSuffixRoot }}-${{ env.buildNumber }}
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Pack
run: dotnet pack /p:PackageVersion=${{ env.versionSemVer }}-${{ env.versionSuffixRoot }}-${{ env.buildNumber }}
- name: Push
run: dotnet nuget push ./**/atlassian-authentication-helper*.*.nupkg --api-key ${{ secrets.MYGET_ITOFINITY_APIKEY }} --source https://www.myget.org/F/itofinity/api/v2/package
- name: Publish Portable
run: dotnet publish -c release -o ./distribution/portable/release
- name: Publish OSX
run: dotnet publish -r osx-x64 -c release -o ./distribution/osx-x64/release /p:PublishSingleFile=true /p:PublishTrimmed=true
- name: Publish Windows
run: dotnet publish -r win-x64 -c release -o ./distribution/win-x64/release /p:PublishSingleFile=true /p:PublishTrimmed=true
- name: Publish Linux
run: dotnet publish -r linux-x64 -c release -o ./distribution/linux-x64/release /p:PublishSingleFile=true /p:PublishTrimmed=true
- name: Upload Nupkg
uses: actions/upload-artifact@v2-preview
with:
name: atlassian-authentication-helper.${{ env.versionSemVer }}-${{ env.versionSuffixRoot }}-${{ env.buildNumber }}.nupkg.zip
path: ./**/atlassian-authentication-helper*.*.nupkg
- name: Upload Portable Artifact
uses: actions/upload-artifact@v2-preview
with:
name: atlassian-authentication-helper.${{ env.versionSemVer }}-${{ env.versionSuffixRoot }}-${{ env.buildNumber }}.exe.osx-x64.zip
path: ./distribution/portable/release
- name: Upload OSX Artifact
uses: actions/upload-artifact@v2-preview
with:
name: atlassian-authentication-helper.${{ env.versionSemVer }}-${{ env.versionSuffixRoot }}-${{ env.buildNumber }}.exe.osx-x64.zip
path: ./distribution/osx-x64/release/
- name: Upload Windows Artifact
uses: actions/upload-artifact@v2-preview
with:
name: atlassian-authentication-helper.${{ env.versionSemVer }}-${{ env.versionSuffixRoot }}-${{ env.buildNumber }}.exe.win-x64.zip
path: ./distribution/win-x64/release/
- name: Upload Linux Artifact
uses: actions/upload-artifact@v2-preview
with:
name: atlassian-authentication-helper.${{ env.versionSemVer }}-${{ env.versionSuffixRoot }}-${{ env.buildNumber }}.exe.linux-x64.zip
path: ./distribution/linux-x64/release/
- name: Release
uses: meeDamian/github-release@2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: v${{ env.versionSemVer }}-${{ env.versionSuffixRoot }}-${{ env.buildNumber }}
name: Release v${{ env.versionSemVer }}-${{ env.versionSuffixRoot }}-${{ env.buildNumber }}
body: >
CI created release
gzip: folders
prerelease: true
files: >
atlassian-authentication-helper-portable:./distribution/portable/release
atlassian-authentication-helper-windows:./distribution/win-x64/release/
atlassian-authentication-helper-linux:./distribution/linux-x64/release/
atlassian-authentication-helper-osx:./distribution/osx-x64/release/
license:LICENSE