Skip to content

Tagged Release

Tagged Release #193

Workflow file for this run

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 dotnet version
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x' # SDK Version to use.
- 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
continue-on-error: true # ILRepack.Lib.MSBuild can make dll but with error, so there's no other choice to add this line.
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/net6.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/net6.0/Packed/osu.Game.Rulesets.Karaoke.dll
osu.Game.Rulesets.Karaoke/bin/Release/net6.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