forked from bittercoder/Migrator.NET
-
-
Notifications
You must be signed in to change notification settings - Fork 12
48 lines (41 loc) · 1.42 KB
/
release.yml
File metadata and controls
48 lines (41 loc) · 1.42 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
name: Build Release
on:
release:
types: [published]
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fetch history
run: git fetch --prune --unshallow
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
9.0.x
- name: Restore dependencies
run: |
dotnet restore Migrator.slnx
- name: Update project version
uses: roryprimrose/set-vs-sdk-project-version@v1
with:
version: ${{ github.event.release.tag_name }}
assemblyVersion: ${{ github.event.release.tag_name }}
fileVersion: ${{ github.event.release.tag_name }}
informationalVersion: ${{ github.event.release.tag_name }}-${{ github.sha }}
- name: Build
run: |
dotnet build -c Release Migrator.slnx
- name: Upload to release
uses: AButler/upload-release-assets@v3.0
with:
files: 'src/Migrator/bin/Release/DotNetProjects.Migrator.${{ github.event.release.tag_name }}.nupkg'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to nuget
run: |
find . -type f -name *.nupkg -print0 | xargs -0 -I pkg dotnet nuget push pkg -k $nuget_api_key -s "https://api.nuget.org/v3/index.json" --skip-duplicate
env:
nuget_api_key: ${{ secrets.NUGET_API_KEY }}
working-directory: ./src/Migrator/bin/Release/net9.0/