Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from IvanJosipovic/dev
Browse files Browse the repository at this point in the history
CI/CD and Nuget Updates
  • Loading branch information
IvanJosipovic authored Nov 3, 2019
2 parents e4cce87 + 2f66d0c commit 0e22797
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 4 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI/CD

on:
push:
branches:
- '*'

jobs:
build:

name: CI/CD
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout code
uses: actions/checkout@v1

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.100

- name: Publish
working-directory: src/BlazorFileSaver.Sample
run: dotnet publish -c Release

- name: Deploy to Test
uses: netlify/actions/cli@master
with:
args: deploy --json -d src/BlazorFileSaver.Sample/bin/Release/netstandard2.0/publish/BlazorFileSaver.Sample/dist/
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

- name: Deploy to Production
if: github.ref == 'refs/heads/master'
uses: netlify/actions/cli@master
with:
args: deploy --prod --json -d src/BlazorFileSaver.Sample/bin/Release/netstandard2.0/publish/BlazorFileSaver.Sample/dist/
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Create Release

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:

name: Create Release
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout code
uses: actions/checkout@v1

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.0.100

- name: Dotnet Pack
working-directory: src/BlazorFileSaver
run: dotnet pack -c Release -p:Version=${GITHUB_REF##*/v}

- name: Dotnet Nuget Push
working-directory: src/BlazorFileSaver/bin/Release
run: dotnet nuget push BlazorFileSaver.*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
continue-on-error: true

- name: Create Release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
13 changes: 9 additions & 4 deletions src/BlazorFileSaver/BlazorFileSaver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@
<Title>BlazorFileSaver</Title>
<Description>Blazor Component wrapper for FileSaver.js</Description>
<Authors>Ivan Josipovic</Authors>
<PackageProjectUrl>https://github.com/IvanJosipovic/BlazorFileSaver</PackageProjectUrl>
<PackageProjectUrl>https://blazorfilesaver.netlify.com/</PackageProjectUrl>
<PackageTags>Blazor;File;Save;FileSave;FileSaver</PackageTags>
<Version>3.0.0</Version>
<PackageReleaseNotes>Updated to Blazor 3.0.0</PackageReleaseNotes>
<PackageIconUrl>https://msdnshared.blob.core.windows.net/media/2018/04/Blazor-300x280.jpg</PackageIconUrl>
<PackageIcon>icon.png</PackageIcon>
<RepositoryUrl>https://github.com/IvanJosipovic/BlazorFileSaver</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>

<ItemGroup>
<None Include="icon.png" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<!-- .js/.css files will be referenced via <script>/<link> tags; other content files will just be included in the app's 'dist' directory without any tags referencing them -->
Expand Down
Binary file added src/BlazorFileSaver/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0e22797

Please sign in to comment.