From 94672c03f77d58d40b4168dd58c8eb430e65fc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=82=BA=E4=BB=80=E9=BA=BC?= Date: Sat, 4 Jul 2020 18:30:45 +0900 Subject: [PATCH] Add release setting --- .github/workflows/dotnet-core.yml | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/dotnet-core.yml diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml new file mode 100644 index 000000000..e7239a8f8 --- /dev/null +++ b/.github/workflows/dotnet-core.yml @@ -0,0 +1,43 @@ +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: Fetch all tags + run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + - name: Get current tag + run: echo "::set-env name=CURRENT_TAG::$(git describe --abbrev=0 --tags $(git rev-list --tags --max-count=1))" + - 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: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@master + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./osu.Game.Rulesets.Karaoke/bin/Release/netstandard2.1/osu.Game.Rulesets.Karaoke.dll + asset_name: osu.Game.Rulesets.Karaoke.dll + asset_content_type: application/vnd.microsoft.portable-executable + - name: Generate changelog + run: | + sudo npm install github-release-notes -g + gren release -T ${{secrets.RELEASE_TOKEN}} --tags=${{env.CURRENT_TAG}} --override