-
Notifications
You must be signed in to change notification settings - Fork 16
50 lines (48 loc) · 1.66 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
name: Tagged Release
on:
push:
tags: ['*']
jobs:
build:
name: Build and Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x"
- name: Fetch all tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Get current tag
run: echo "CURRENT_TAG=$(git describe --abbrev=0 --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build osu.Game.Rulesets.Karaoke --configuration Release -p:version=${{env.CURRENT_TAG}} --no-restore
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
- name: Zip the dlls
run: |
cd osu.Game.Rulesets.Karaoke/bin/Release/net8.0/DLLs
zip -r ../osu.Game.Rulesets.Karaoke.zip ./*
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.RELEASE_TOKEN }}
files: |
osu.Game.Rulesets.Karaoke/bin/Release/net8.0/osu.Game.Rulesets.Karaoke.zip
draft: true
body: |
Thank you for showing interest in this ruleset. This is a tagged release (${{ env.CURRENT_TAG }}).
- name: Generate changelog
run: |
sudo npm install github-release-notes -g
gren release -T ${{secrets.RELEASE_TOKEN}} --tags=${{env.CURRENT_TAG}} --override