Merge pull request #2212 from andy840119/implement-utils-to-save-or-e… #205
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |