Skip to content

Commit

Permalink
adds github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
somdoron committed Jul 12, 2020
1 parent aac47a0 commit a9e2006
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI
on: [push, pull_request]

jobs:
ununtu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Decrypt snk
uses: shinhwagk/[email protected]
with:
crypto-path: nacl.net.snk.enc
crypto-action: dec
crypto-password: ${{ secrets.SNK_SECRET }}
- run: dotnet restore .
- name: build
run: dotnet build .
- name: test
run: dotnet test NaCl.net.Tests

30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: release
on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
if: "!github.event.release.prerelease"
steps:
- uses: actions/checkout@v2
- name: Decrypt snk
uses: shinhwagk/[email protected]
with:
crypto-path: nacl.net.snk.enc
crypto-action: dec
crypto-password: ${{ secrets.SNK_SECRET }}
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
shell: bash
- run: echo ${{ steps.get_version.outputs.VERSION }}
- run: dotnet restore .
- run: dotnet pack NaCl.net -o . -c Release /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} /p:Version=${{ steps.get_version.outputs.VERSION }} /p:ContinuousIntegrationBuild=true
- run: dotnet nuget push *.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NuGetAPIKey }}
shell: bash


7 changes: 6 additions & 1 deletion NaCl.net/NaCl.net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\nacl.net.snk</AssemblyOriginatorKeyFile>
<PublicSign>false</PublicSign>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/somdoron/NaCl.net</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Deterministic>true</Deterministic>
<DeterministicSourcePaths>true</DeterministicSourcePaths>
<IncludeSource>true</IncludeSource>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Title>C# port of NaCl crypto library</Title>
Expand Down Expand Up @@ -47,4 +52,4 @@
<PackageReference Include="System.Memory" Version="4.5.3" />
</ItemGroup>

</Project>
</Project>
Binary file modified nacl.net.snk.enc
Binary file not shown.

0 comments on commit a9e2006

Please sign in to comment.