From 075ab6828395542b0867d00fe55133b2f1fe2ae1 Mon Sep 17 00:00:00 2001 From: Allen Date: Thu, 6 Aug 2020 19:14:02 -0300 Subject: [PATCH] Create dotnet-core.yml added github actions stuff --- .github/workflows/dotnet-core.yml | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 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 0000000..bc482cf --- /dev/null +++ b/.github/workflows/dotnet-core.yml @@ -0,0 +1,45 @@ +name: .NET Core + +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.301 + - name: Install dependencies + run: dotnet restore + - name: Build + run: | + dotnet build --configuration Release --no-restore + zip -r Release.zip bin/Release/* + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./Release.zip + asset_name: Release.zip + asset_content_type: application/zip