Skip to content

fix: ci/cd draft removal #8

fix: ci/cd draft removal

fix: ci/cd draft removal #8

Workflow file for this run

name: CI/CD MusixmatchClientLib
on:
push:
pull_request:
jobs:
mxmcl-cicd:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "3.1.x"
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "5.0.x"
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x"
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x"
- name: Set RELEASE_VERSION
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Restore Packages
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --verbosity minimal
- name: Publish to NuGET
run: |
chmod +x ./publish.sh
./publish.sh
if: startsWith( github.ref, 'refs/tags/')
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
- name: Upload to GH Release
if: startsWith( github.ref, 'refs/tags/')
run: |
zip -j MusixmatchClientLib-netstandard2.0.zip MusixmatchClientLib/bin/Release/netstandard2.0/*
zip -j MusixmatchClientLib-netstandard2.1.zip MusixmatchClientLib/bin/Release/netstandard2.1/*
zip -j MusixmatchClientLib-net5.0.zip MusixmatchClientLib/bin/Release/net5.0/*
zip -j MusixmatchClientLib-net6.0.zip MusixmatchClientLib/bin/Release/net6.0/*
zip -j MusixmatchClientLib-net7.0.zip MusixmatchClientLib/bin/Release/net7.0/*
zip -j MusixmatchClientLib-net8.0.zip MusixmatchClientLib/bin/Release/net8.0/*
gh release upload "$RELEASE_VERSION" \
"MusixmatchClientLib-netstandard2.0.zip" \
"MusixmatchClientLib-netstandard2.1.zip" \
"MusixmatchClientLib-net5.0.zip" \
"MusixmatchClientLib-net6.0.zip" \
"MusixmatchClientLib-net7.0.zip" \
"MusixmatchClientLib-net8.0.zip" \
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}