-
Notifications
You must be signed in to change notification settings - Fork 7
39 lines (33 loc) · 1.13 KB
/
pack.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
name: Pack
on:
push:
tags: '*'
jobs:
pack:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Create package
run: dotnet pack --configuration Release /p:Version=${{ steps.get_version.outputs.VERSION }}
- name: Publish the package to nuget.org
run: dotnet nuget push osu.Server.QueueProcessor/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: false